{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "provenance": [],
      "toc_visible": true
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "language_info": {
      "name": "python"
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "source": [
        "# **Elliptic++ Actors (Wallet Addresses) Dataset**\n",
        "\n",
        "***Note: \"Actor\" refers to a Bitcoin wallet address***\n",
        "\n",
        "---\n",
        "---\n",
        "\n",
        "\n",
        "Released by: Youssef Elmougy, Ling Liu\n",
        "\n",
        "\n",
        "\n",
        "School of Computer Science, Georgia Institute of Technology\n",
        "\n",
        "Contact: yelmougy3@gatech.edu\n",
        "\n",
        "\n",
        "---\n",
        "\n",
        "Github Repository: [https://www.github.com/git-disl/EllipticPlusPlus](https://www.github.com/git-disl/EllipticPlusPlus)\n",
        "\n",
        "\n",
        "If you use our dataset in your work, please cite our paper:\n",
        "\n",
        "\n",
        "\n",
        "\n",
        "\n",
        ">> Youssef Elmougy and Ling Liu. 2023. Demystifying Fraudulent Transactions and Illicit Nodes in the Bitcoin Network for Financial Forensics.\n",
        "\n",
        "---\n",
        "\n"
      ],
      "metadata": {
        "id": "O34u-DVsX4jx"
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "## [SETUP] Import libraries and csv files "
      ],
      "metadata": {
        "id": "ReHrhaPiaiI-"
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "Download dataset from: [https://www.github.com/git-disl/EllipticPlusPlus](https://www.github.com/git-disl/EllipticPlusPlus)"
      ],
      "metadata": {
        "id": "TLi0Zc7j6Rb6"
      }
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "eUbJT_J-A1Mw",
        "outputId": "4020ff04-efa0-4b11-be41-a8507f0bf55e"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount(\"/content/drive\", force_remount=True).\n"
          ]
        }
      ],
      "source": [
        "from google.colab import drive\n",
        "drive.mount('/content/drive')\n",
        "!cp drive/My\\ Drive/Elliptic++\\ Dataset/wallets_features.csv ./\n",
        "!cp drive/My\\ Drive/Elliptic++\\ Dataset/wallets_classes.csv ./\n",
        "!cp drive/My\\ Drive/Elliptic++\\ Dataset/AddrAddr_edgelist.csv ./\n",
        "!cp drive/My\\ Drive/Elliptic++\\ Dataset/AddrTx_edgelist.csv ./\n",
        "!cp drive/My\\ Drive/Elliptic++\\ Dataset/TxAddr_edgelist.csv ./\n",
        "!cp drive/My\\ Drive/Elliptic++\\ Dataset/wallets_features_classes_combined.csv ./"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "kz7WtWhG6MtI",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "076dbd94-a606-4648-b1c7-c1839a9b5e79"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
            "Requirement already satisfied: ipython in /usr/local/lib/python3.8/dist-packages (8.9.0)\n",
            "Requirement already satisfied: pickleshare in /usr/local/lib/python3.8/dist-packages (from ipython) (0.7.5)\n",
            "Requirement already satisfied: prompt-toolkit<3.1.0,>=3.0.30 in /usr/local/lib/python3.8/dist-packages (from ipython) (3.0.36)\n",
            "Requirement already satisfied: traitlets>=5 in /usr/local/lib/python3.8/dist-packages (from ipython) (5.7.1)\n",
            "Requirement already satisfied: backcall in /usr/local/lib/python3.8/dist-packages (from ipython) (0.2.0)\n",
            "Requirement already satisfied: pygments>=2.4.0 in /usr/local/lib/python3.8/dist-packages (from ipython) (2.6.1)\n",
            "Requirement already satisfied: stack-data in /usr/local/lib/python3.8/dist-packages (from ipython) (0.6.2)\n",
            "Requirement already satisfied: pexpect>4.3 in /usr/local/lib/python3.8/dist-packages (from ipython) (4.8.0)\n",
            "Requirement already satisfied: jedi>=0.16 in /usr/local/lib/python3.8/dist-packages (from ipython) (0.18.2)\n",
            "Requirement already satisfied: decorator in /usr/local/lib/python3.8/dist-packages (from ipython) (4.4.2)\n",
            "Requirement already satisfied: matplotlib-inline in /usr/local/lib/python3.8/dist-packages (from ipython) (0.1.6)\n",
            "Requirement already satisfied: parso<0.9.0,>=0.8.0 in /usr/local/lib/python3.8/dist-packages (from jedi>=0.16->ipython) (0.8.3)\n",
            "Requirement already satisfied: ptyprocess>=0.5 in /usr/local/lib/python3.8/dist-packages (from pexpect>4.3->ipython) (0.7.0)\n",
            "Requirement already satisfied: wcwidth in /usr/local/lib/python3.8/dist-packages (from prompt-toolkit<3.1.0,>=3.0.30->ipython) (0.2.5)\n",
            "Requirement already satisfied: asttokens>=2.1.0 in /usr/local/lib/python3.8/dist-packages (from stack-data->ipython) (2.2.1)\n",
            "Requirement already satisfied: pure-eval in /usr/local/lib/python3.8/dist-packages (from stack-data->ipython) (0.2.2)\n",
            "Requirement already satisfied: executing>=1.2.0 in /usr/local/lib/python3.8/dist-packages (from stack-data->ipython) (1.2.0)\n",
            "Requirement already satisfied: six in /usr/local/lib/python3.8/dist-packages (from asttokens>=2.1.0->stack-data->ipython) (1.15.0)\n"
          ]
        }
      ],
      "source": [
        "import numpy as np\n",
        "import pandas as pd\n",
        "import matplotlib.pyplot as plt\n",
        "import seaborn as sns\n",
        "import networkx as nx\n",
        "import plotly.graph_objs as go \n",
        "import plotly.offline as py \n",
        "import math\n",
        "from collections import Counter\n",
        "\n",
        "!pip install -U ipython \n",
        "from IPython.core.interactiveshell import InteractiveShell\n",
        "InteractiveShell.ast_node_interactivity = 'all'"
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "from sklearn.model_selection import train_test_split\n",
        "from sklearn.ensemble import RandomForestClassifier\n",
        "from sklearn.metrics import precision_recall_fscore_support\n",
        "from sklearn.model_selection import train_test_split\n",
        "from sklearn.linear_model import LogisticRegression\n",
        "from sklearn.neural_network import MLPClassifier\n",
        "from sklearn.metrics import f1_score, accuracy_score, confusion_matrix\n",
        "from sklearn.cluster import KMeans\n",
        "from sklearn.model_selection import GridSearchCV\n",
        "from sklearn.preprocessing import MinMaxScaler\n",
        "from sklearn.ensemble import VotingClassifier\n",
        "from sklearn.base import clone \n",
        "\n",
        "import xgboost as xgb"
      ],
      "metadata": {
        "id": "TKJFAkVLp34j"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "!pip install eli5\n",
        "import eli5\n",
        "from eli5.sklearn import PermutationImportance"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "bRW1hh3S4pbS",
        "outputId": "5eb48ea7-b0dd-4804-aaf3-6e438b3eef65"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
            "Collecting eli5\n",
            "  Downloading eli5-0.13.0.tar.gz (216 kB)\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m216.2/216.2 KB\u001b[0m \u001b[31m8.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25h  Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
            "Requirement already satisfied: attrs>17.1.0 in /usr/local/lib/python3.8/dist-packages (from eli5) (22.2.0)\n",
            "Collecting jinja2>=3.0.0\n",
            "  Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m133.1/133.1 KB\u001b[0m \u001b[31m17.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25hRequirement already satisfied: numpy>=1.9.0 in /usr/local/lib/python3.8/dist-packages (from eli5) (1.21.6)\n",
            "Requirement already satisfied: scipy in /usr/local/lib/python3.8/dist-packages (from eli5) (1.7.3)\n",
            "Requirement already satisfied: six in /usr/local/lib/python3.8/dist-packages (from eli5) (1.15.0)\n",
            "Requirement already satisfied: scikit-learn>=0.20 in /usr/local/lib/python3.8/dist-packages (from eli5) (1.0.2)\n",
            "Requirement already satisfied: graphviz in /usr/local/lib/python3.8/dist-packages (from eli5) (0.10.1)\n",
            "Requirement already satisfied: tabulate>=0.7.7 in /usr/local/lib/python3.8/dist-packages (from eli5) (0.8.10)\n",
            "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.8/dist-packages (from jinja2>=3.0.0->eli5) (2.0.1)\n",
            "Requirement already satisfied: joblib>=0.11 in /usr/local/lib/python3.8/dist-packages (from scikit-learn>=0.20->eli5) (1.2.0)\n",
            "Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.8/dist-packages (from scikit-learn>=0.20->eli5) (3.1.0)\n",
            "Building wheels for collected packages: eli5\n",
            "  Building wheel for eli5 (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
            "  Created wheel for eli5: filename=eli5-0.13.0-py2.py3-none-any.whl size=107748 sha256=4ad64e3b8b283172c1ae01f750cdea27fcc42eeef533a5a0428c77fa474f08d2\n",
            "  Stored in directory: /root/.cache/pip/wheels/85/ac/25/ffcd87ef8f9b1eec324fdf339359be71f22612459d8c75d89c\n",
            "Successfully built eli5\n",
            "Installing collected packages: jinja2, eli5\n",
            "  Attempting uninstall: jinja2\n",
            "    Found existing installation: Jinja2 2.11.3\n",
            "    Uninstalling Jinja2-2.11.3:\n",
            "      Successfully uninstalled Jinja2-2.11.3\n",
            "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
            "notebook 5.7.16 requires jinja2<=3.0.0, but you have jinja2 3.1.2 which is incompatible.\n",
            "google-colab 1.0.0 requires ipython~=7.9.0, but you have ipython 8.9.0 which is incompatible.\n",
            "flask 1.1.4 requires Jinja2<3.0,>=2.10.1, but you have jinja2 3.1.2 which is incompatible.\u001b[0m\u001b[31m\n",
            "\u001b[0mSuccessfully installed eli5-0.13.0 jinja2-3.1.2\n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "## Actors Dataset Overview\n",
        "\n",
        "\n",
        "---\n",
        "\n",
        "This section loads the 5 csv files (wallets_features, wallets_classes, AddrAddr_edgelist, AddrTx_edgelist, TxAddr_edgelist) and provides a quick overview of the dataset structure and features."
      ],
      "metadata": {
        "id": "y3JLmL3SfJqP"
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "Load saved actors dataset csv files:"
      ],
      "metadata": {
        "id": "ZcdjXmV8gr8S"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "print(\"\\nActors features: \\n\")\n",
        "df_wallets_features = pd.read_csv(\"wallets_features.csv\")\n",
        "df_wallets_features\n",
        "\n",
        "print(\"\\nActors Classes: \\n\")\n",
        "df_wallets_classes = pd.read_csv(\"wallets_classes.csv\")\n",
        "df_wallets_classes\n",
        "\n",
        "print(\"\\nAddress-Address edgelist: \\n\") #Actor Interaction graph edgelist\n",
        "df_AddrAddr_edgelist = pd.read_csv(\"AddrAddr_edgelist.csv\")\n",
        "df_AddrAddr_edgelist\n",
        "\n",
        "print(\"\\nAddress-Transaction edgelist: \\n\") #Address-Transaction graph edgelist\n",
        "df_AddrTx_edgelist = pd.read_csv(\"AddrTx_edgelist.csv\")\n",
        "df_AddrTx_edgelist\n",
        "\n",
        "print(\"\\nTransaction-Address edgelist: \\n\") #Address-Transaction graph edgelist\n",
        "df_TxAddr_edgelist = pd.read_csv(\"TxAddr_edgelist.csv\")\n",
        "df_TxAddr_edgelist\n",
        "\n",
        "# combined features and classes csv files for convenience\n",
        "df_wallets_features_classes_combined = pd.read_csv(\"wallets_features_classes_combined.csv\")"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 1000
        },
        "id": "dNNEwGmae2Eo",
        "outputId": "fe1af67e-d31b-49bf-e19b-7f93dd6fdb98"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "Actors features: \n",
            "\n"
          ]
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "                                    address  Time step  num_txs_as_sender  \\\n",
              "0         111112TykSw72ztDN2WJger4cynzWYC5w         25                0.0   \n",
              "1         1111DAYXhoxZx2tsRnzimfozo783x1yC2         25                0.0   \n",
              "2         1111DAYXhoxZx2tsRnzimfozo783x1yC2         29                0.0   \n",
              "3         1111DAYXhoxZx2tsRnzimfozo783x1yC2         39                0.0   \n",
              "4         1111DAYXhoxZx2tsRnzimfozo783x1yC2         39                0.0   \n",
              "...                                     ...        ...                ...   \n",
              "1268255  3R2Uw5MRdSSigp8AjfT7K5es6Hupm4qLSq         31                1.0   \n",
              "1268256  3R2VBFbqHGC4bQ7b4ixN4jZTdv7RMbEYtf         44                0.0   \n",
              "1268257  3R2WFmRwbDeo3rMVVu5J3jjMxAuQYYWAid          9                0.0   \n",
              "1268258  3R2WTZGYLmbJQyoDSBftJsPRvF1mSEtkh6          3                0.0   \n",
              "1268259  3R2bm6iqbzcVpEeFCSFarS56b56QfjyiSW          9                1.0   \n",
              "\n",
              "         num_txs_as receiver  first_block_appeared_in  last_block_appeared_in  \\\n",
              "0                        1.0                 439586.0                439586.0   \n",
              "1                        8.0                 439589.0                485959.0   \n",
              "2                        8.0                 439589.0                485959.0   \n",
              "3                        8.0                 439589.0                485959.0   \n",
              "4                        8.0                 439589.0                485959.0   \n",
              "...                      ...                      ...                     ...   \n",
              "1268255                  1.0                 451684.0                451685.0   \n",
              "1268256                  1.0                 477895.0                477895.0   \n",
              "1268257                  1.0                 407342.0                407342.0   \n",
              "1268258                  1.0                 395235.0                395235.0   \n",
              "1268259                  0.0                 407333.0                407333.0   \n",
              "\n",
              "         lifetime_in_blocks  total_txs  first_sent_block  \\\n",
              "0                       0.0        1.0               0.0   \n",
              "1                   46370.0        8.0               0.0   \n",
              "2                   46370.0        8.0               0.0   \n",
              "3                   46370.0        8.0               0.0   \n",
              "4                   46370.0        8.0               0.0   \n",
              "...                     ...        ...               ...   \n",
              "1268255                 1.0        2.0          451685.0   \n",
              "1268256                 0.0        1.0               0.0   \n",
              "1268257                 0.0        1.0               0.0   \n",
              "1268258                 0.0        1.0               0.0   \n",
              "1268259                 0.0        1.0          407333.0   \n",
              "\n",
              "         first_received_block  ...  blocks_btwn_output_txs_min  \\\n",
              "0                    439586.0  ...                         0.0   \n",
              "1                    439589.0  ...                         0.0   \n",
              "2                    439589.0  ...                         0.0   \n",
              "3                    439589.0  ...                         0.0   \n",
              "4                    439589.0  ...                         0.0   \n",
              "...                       ...  ...                         ...   \n",
              "1268255              451684.0  ...                         0.0   \n",
              "1268256              477895.0  ...                         0.0   \n",
              "1268257              407342.0  ...                         0.0   \n",
              "1268258              395235.0  ...                         0.0   \n",
              "1268259                   0.0  ...                         0.0   \n",
              "\n",
              "         blocks_btwn_output_txs_max  blocks_btwn_output_txs_mean  \\\n",
              "0                               0.0                     0.000000   \n",
              "1                           20164.0                  6624.285714   \n",
              "2                           20164.0                  6624.285714   \n",
              "3                           20164.0                  6624.285714   \n",
              "4                           20164.0                  6624.285714   \n",
              "...                             ...                          ...   \n",
              "1268255                         0.0                     0.000000   \n",
              "1268256                         0.0                     0.000000   \n",
              "1268257                         0.0                     0.000000   \n",
              "1268258                         0.0                     0.000000   \n",
              "1268259                         0.0                     0.000000   \n",
              "\n",
              "         blocks_btwn_output_txs_median  num_addr_transacted_multiple  \\\n",
              "0                                  0.0                           0.0   \n",
              "1                               8060.0                           0.0   \n",
              "2                               8060.0                           0.0   \n",
              "3                               8060.0                           0.0   \n",
              "4                               8060.0                           0.0   \n",
              "...                                ...                           ...   \n",
              "1268255                            0.0                           0.0   \n",
              "1268256                            0.0                           0.0   \n",
              "1268257                            0.0                           0.0   \n",
              "1268258                            0.0                           0.0   \n",
              "1268259                            0.0                           0.0   \n",
              "\n",
              "         transacted_w_address_total  transacted_w_address_min  \\\n",
              "0                              24.0                       1.0   \n",
              "1                               8.0                       1.0   \n",
              "2                               8.0                       1.0   \n",
              "3                               8.0                       1.0   \n",
              "4                               8.0                       1.0   \n",
              "...                             ...                       ...   \n",
              "1268255                         3.0                       1.0   \n",
              "1268256                         1.0                       1.0   \n",
              "1268257                         1.0                       1.0   \n",
              "1268258                         1.0                       1.0   \n",
              "1268259                         1.0                       1.0   \n",
              "\n",
              "         transacted_w_address_max  transacted_w_address_mean  \\\n",
              "0                             1.0                        1.0   \n",
              "1                             1.0                        1.0   \n",
              "2                             1.0                        1.0   \n",
              "3                             1.0                        1.0   \n",
              "4                             1.0                        1.0   \n",
              "...                           ...                        ...   \n",
              "1268255                       1.0                        1.0   \n",
              "1268256                       1.0                        1.0   \n",
              "1268257                       1.0                        1.0   \n",
              "1268258                       1.0                        1.0   \n",
              "1268259                       1.0                        1.0   \n",
              "\n",
              "         transacted_w_address_median  \n",
              "0                                1.0  \n",
              "1                                1.0  \n",
              "2                                1.0  \n",
              "3                                1.0  \n",
              "4                                1.0  \n",
              "...                              ...  \n",
              "1268255                          1.0  \n",
              "1268256                          1.0  \n",
              "1268257                          1.0  \n",
              "1268258                          1.0  \n",
              "1268259                          1.0  \n",
              "\n",
              "[1268260 rows x 57 columns]"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-9581ea60-d34a-4cc9-804b-29709baa47a1\">\n",
              "    <div class=\"colab-df-container\">\n",
              "      <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>address</th>\n",
              "      <th>Time step</th>\n",
              "      <th>num_txs_as_sender</th>\n",
              "      <th>num_txs_as receiver</th>\n",
              "      <th>first_block_appeared_in</th>\n",
              "      <th>last_block_appeared_in</th>\n",
              "      <th>lifetime_in_blocks</th>\n",
              "      <th>total_txs</th>\n",
              "      <th>first_sent_block</th>\n",
              "      <th>first_received_block</th>\n",
              "      <th>...</th>\n",
              "      <th>blocks_btwn_output_txs_min</th>\n",
              "      <th>blocks_btwn_output_txs_max</th>\n",
              "      <th>blocks_btwn_output_txs_mean</th>\n",
              "      <th>blocks_btwn_output_txs_median</th>\n",
              "      <th>num_addr_transacted_multiple</th>\n",
              "      <th>transacted_w_address_total</th>\n",
              "      <th>transacted_w_address_min</th>\n",
              "      <th>transacted_w_address_max</th>\n",
              "      <th>transacted_w_address_mean</th>\n",
              "      <th>transacted_w_address_median</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>111112TykSw72ztDN2WJger4cynzWYC5w</td>\n",
              "      <td>25</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>439586.0</td>\n",
              "      <td>439586.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>439586.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>24.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>1111DAYXhoxZx2tsRnzimfozo783x1yC2</td>\n",
              "      <td>25</td>\n",
              "      <td>0.0</td>\n",
              "      <td>8.0</td>\n",
              "      <td>439589.0</td>\n",
              "      <td>485959.0</td>\n",
              "      <td>46370.0</td>\n",
              "      <td>8.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>439589.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>20164.0</td>\n",
              "      <td>6624.285714</td>\n",
              "      <td>8060.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>8.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>1111DAYXhoxZx2tsRnzimfozo783x1yC2</td>\n",
              "      <td>29</td>\n",
              "      <td>0.0</td>\n",
              "      <td>8.0</td>\n",
              "      <td>439589.0</td>\n",
              "      <td>485959.0</td>\n",
              "      <td>46370.0</td>\n",
              "      <td>8.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>439589.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>20164.0</td>\n",
              "      <td>6624.285714</td>\n",
              "      <td>8060.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>8.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>1111DAYXhoxZx2tsRnzimfozo783x1yC2</td>\n",
              "      <td>39</td>\n",
              "      <td>0.0</td>\n",
              "      <td>8.0</td>\n",
              "      <td>439589.0</td>\n",
              "      <td>485959.0</td>\n",
              "      <td>46370.0</td>\n",
              "      <td>8.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>439589.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>20164.0</td>\n",
              "      <td>6624.285714</td>\n",
              "      <td>8060.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>8.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>1111DAYXhoxZx2tsRnzimfozo783x1yC2</td>\n",
              "      <td>39</td>\n",
              "      <td>0.0</td>\n",
              "      <td>8.0</td>\n",
              "      <td>439589.0</td>\n",
              "      <td>485959.0</td>\n",
              "      <td>46370.0</td>\n",
              "      <td>8.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>439589.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>20164.0</td>\n",
              "      <td>6624.285714</td>\n",
              "      <td>8060.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>8.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1268255</th>\n",
              "      <td>3R2Uw5MRdSSigp8AjfT7K5es6Hupm4qLSq</td>\n",
              "      <td>31</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>451684.0</td>\n",
              "      <td>451685.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>2.0</td>\n",
              "      <td>451685.0</td>\n",
              "      <td>451684.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>3.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1268256</th>\n",
              "      <td>3R2VBFbqHGC4bQ7b4ixN4jZTdv7RMbEYtf</td>\n",
              "      <td>44</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>477895.0</td>\n",
              "      <td>477895.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>477895.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1268257</th>\n",
              "      <td>3R2WFmRwbDeo3rMVVu5J3jjMxAuQYYWAid</td>\n",
              "      <td>9</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>407342.0</td>\n",
              "      <td>407342.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>407342.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1268258</th>\n",
              "      <td>3R2WTZGYLmbJQyoDSBftJsPRvF1mSEtkh6</td>\n",
              "      <td>3</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>395235.0</td>\n",
              "      <td>395235.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>395235.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1268259</th>\n",
              "      <td>3R2bm6iqbzcVpEeFCSFarS56b56QfjyiSW</td>\n",
              "      <td>9</td>\n",
              "      <td>1.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>407333.0</td>\n",
              "      <td>407333.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>407333.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>1268260 rows × 57 columns</p>\n",
              "</div>\n",
              "      <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-9581ea60-d34a-4cc9-804b-29709baa47a1')\"\n",
              "              title=\"Convert this dataframe to an interactive table.\"\n",
              "              style=\"display:none;\">\n",
              "        \n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
              "    <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
              "  </svg>\n",
              "      </button>\n",
              "      \n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      flex-wrap:wrap;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "      <script>\n",
              "        const buttonEl =\n",
              "          document.querySelector('#df-9581ea60-d34a-4cc9-804b-29709baa47a1 button.colab-df-convert');\n",
              "        buttonEl.style.display =\n",
              "          google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "        async function convertToInteractive(key) {\n",
              "          const element = document.querySelector('#df-9581ea60-d34a-4cc9-804b-29709baa47a1');\n",
              "          const dataTable =\n",
              "            await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                     [key], {});\n",
              "          if (!dataTable) return;\n",
              "\n",
              "          const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "            '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "            + ' to learn more about interactive tables.';\n",
              "          element.innerHTML = '';\n",
              "          dataTable['output_type'] = 'display_data';\n",
              "          await google.colab.output.renderOutput(dataTable, element);\n",
              "          const docLink = document.createElement('div');\n",
              "          docLink.innerHTML = docLinkHtml;\n",
              "          element.appendChild(docLink);\n",
              "        }\n",
              "      </script>\n",
              "    </div>\n",
              "  </div>\n",
              "  "
            ]
          },
          "metadata": {},
          "execution_count": 15
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "Actors Classes: \n",
            "\n"
          ]
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "                                   address  class\n",
              "0        111112TykSw72ztDN2WJger4cynzWYC5w      2\n",
              "1        1111DAYXhoxZx2tsRnzimfozo783x1yC2      3\n",
              "2         1111VHuXEzHaRCgXbVwojtaP7Co3QABb      2\n",
              "3       111218KKkh1JJFRHbwM16AwCiVCc4m7he1      3\n",
              "4        1115LWW3xsD9jT9VRY7viCN9S34RVAAuA      2\n",
              "...                                    ...    ...\n",
              "822937  3R2Uw5MRdSSigp8AjfT7K5es6Hupm4qLSq      3\n",
              "822938  3R2VBFbqHGC4bQ7b4ixN4jZTdv7RMbEYtf      3\n",
              "822939  3R2WFmRwbDeo3rMVVu5J3jjMxAuQYYWAid      3\n",
              "822940  3R2WTZGYLmbJQyoDSBftJsPRvF1mSEtkh6      3\n",
              "822941  3R2bm6iqbzcVpEeFCSFarS56b56QfjyiSW      3\n",
              "\n",
              "[822942 rows x 2 columns]"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-3d0d3bb1-0f37-4b9c-b660-f2f34b12e224\">\n",
              "    <div class=\"colab-df-container\">\n",
              "      <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>address</th>\n",
              "      <th>class</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>111112TykSw72ztDN2WJger4cynzWYC5w</td>\n",
              "      <td>2</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>1111DAYXhoxZx2tsRnzimfozo783x1yC2</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>1111VHuXEzHaRCgXbVwojtaP7Co3QABb</td>\n",
              "      <td>2</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>111218KKkh1JJFRHbwM16AwCiVCc4m7he1</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>1115LWW3xsD9jT9VRY7viCN9S34RVAAuA</td>\n",
              "      <td>2</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>822937</th>\n",
              "      <td>3R2Uw5MRdSSigp8AjfT7K5es6Hupm4qLSq</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>822938</th>\n",
              "      <td>3R2VBFbqHGC4bQ7b4ixN4jZTdv7RMbEYtf</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>822939</th>\n",
              "      <td>3R2WFmRwbDeo3rMVVu5J3jjMxAuQYYWAid</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>822940</th>\n",
              "      <td>3R2WTZGYLmbJQyoDSBftJsPRvF1mSEtkh6</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>822941</th>\n",
              "      <td>3R2bm6iqbzcVpEeFCSFarS56b56QfjyiSW</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>822942 rows × 2 columns</p>\n",
              "</div>\n",
              "      <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-3d0d3bb1-0f37-4b9c-b660-f2f34b12e224')\"\n",
              "              title=\"Convert this dataframe to an interactive table.\"\n",
              "              style=\"display:none;\">\n",
              "        \n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
              "    <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
              "  </svg>\n",
              "      </button>\n",
              "      \n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      flex-wrap:wrap;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "      <script>\n",
              "        const buttonEl =\n",
              "          document.querySelector('#df-3d0d3bb1-0f37-4b9c-b660-f2f34b12e224 button.colab-df-convert');\n",
              "        buttonEl.style.display =\n",
              "          google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "        async function convertToInteractive(key) {\n",
              "          const element = document.querySelector('#df-3d0d3bb1-0f37-4b9c-b660-f2f34b12e224');\n",
              "          const dataTable =\n",
              "            await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                     [key], {});\n",
              "          if (!dataTable) return;\n",
              "\n",
              "          const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "            '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "            + ' to learn more about interactive tables.';\n",
              "          element.innerHTML = '';\n",
              "          dataTable['output_type'] = 'display_data';\n",
              "          await google.colab.output.renderOutput(dataTable, element);\n",
              "          const docLink = document.createElement('div');\n",
              "          docLink.innerHTML = docLinkHtml;\n",
              "          element.appendChild(docLink);\n",
              "        }\n",
              "      </script>\n",
              "    </div>\n",
              "  </div>\n",
              "  "
            ]
          },
          "metadata": {},
          "execution_count": 15
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "Address-Address edgelist: \n",
            "\n"
          ]
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "                              input_address  \\\n",
              "0        14YRXHHof4BY1TVxN5FqYPcEdpmXiYT78a   \n",
              "1        14YRXHHof4BY1TVxN5FqYPcEdpmXiYT78a   \n",
              "2        13Lhad3SAmu2vqYg2dxbNcxH7LE77kJu2w   \n",
              "3        1MAQQZn7EHP6J3erXByCciFiVcgS8ZhWqz   \n",
              "4        1MAQQZn7EHP6J3erXByCciFiVcgS8ZhWqz   \n",
              "...                                     ...   \n",
              "2868959  3MfN5to5K5be2RupWE8rjJHQ6V9L8ypWeh   \n",
              "2868960  3DzbpEogZ1mn9FgCHcmzYPLDbV9GuxYHpi   \n",
              "2868961  34yD1sQg6C16aANCtibYXRj5NsX6tt4v5R   \n",
              "2868962  1JERHCgwHG2Z7T3KjNpEwj3fJNX8vSfCX2   \n",
              "2868963  1JERHCgwHG2Z7T3KjNpEwj3fJNX8vSfCX2   \n",
              "\n",
              "                             output_address  \n",
              "0        1GASxu5nMntiRKdVtTVRvEbP965G51bhHH  \n",
              "1        14YRXHHof4BY1TVxN5FqYPcEdpmXiYT78a  \n",
              "2        1GFdrdgtG34GChM8SMpMwcXFc4nYbH1A5G  \n",
              "3        19q57SeCEzTnWrWVXA43nZzhSiXkYggh7c  \n",
              "4        1Kk1NVYnCE8ALXDhgMM6HqTt1jDSvi6QBA  \n",
              "...                                     ...  \n",
              "2868959  3MfN5to5K5be2RupWE8rjJHQ6V9L8ypWeh  \n",
              "2868960  38jMiiZs2C5n5MPkyc5pSA7wwW6H4p6hPa  \n",
              "2868961  3G9b7hWZccuft1V4eGUcZqTZaxsqx699bM  \n",
              "2868962  1JERHCgwHG2Z7T3KjNpEwj3fJNX8vSfCX2  \n",
              "2868963  15T4xJj6XxyPZWGLPR3S72hD9f9YzUQf36  \n",
              "\n",
              "[2868964 rows x 2 columns]"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-08f4f543-1ad2-435c-a6df-74e3f0254ecd\">\n",
              "    <div class=\"colab-df-container\">\n",
              "      <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>input_address</th>\n",
              "      <th>output_address</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>14YRXHHof4BY1TVxN5FqYPcEdpmXiYT78a</td>\n",
              "      <td>1GASxu5nMntiRKdVtTVRvEbP965G51bhHH</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>14YRXHHof4BY1TVxN5FqYPcEdpmXiYT78a</td>\n",
              "      <td>14YRXHHof4BY1TVxN5FqYPcEdpmXiYT78a</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>13Lhad3SAmu2vqYg2dxbNcxH7LE77kJu2w</td>\n",
              "      <td>1GFdrdgtG34GChM8SMpMwcXFc4nYbH1A5G</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>1MAQQZn7EHP6J3erXByCciFiVcgS8ZhWqz</td>\n",
              "      <td>19q57SeCEzTnWrWVXA43nZzhSiXkYggh7c</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>1MAQQZn7EHP6J3erXByCciFiVcgS8ZhWqz</td>\n",
              "      <td>1Kk1NVYnCE8ALXDhgMM6HqTt1jDSvi6QBA</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2868959</th>\n",
              "      <td>3MfN5to5K5be2RupWE8rjJHQ6V9L8ypWeh</td>\n",
              "      <td>3MfN5to5K5be2RupWE8rjJHQ6V9L8ypWeh</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2868960</th>\n",
              "      <td>3DzbpEogZ1mn9FgCHcmzYPLDbV9GuxYHpi</td>\n",
              "      <td>38jMiiZs2C5n5MPkyc5pSA7wwW6H4p6hPa</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2868961</th>\n",
              "      <td>34yD1sQg6C16aANCtibYXRj5NsX6tt4v5R</td>\n",
              "      <td>3G9b7hWZccuft1V4eGUcZqTZaxsqx699bM</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2868962</th>\n",
              "      <td>1JERHCgwHG2Z7T3KjNpEwj3fJNX8vSfCX2</td>\n",
              "      <td>1JERHCgwHG2Z7T3KjNpEwj3fJNX8vSfCX2</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2868963</th>\n",
              "      <td>1JERHCgwHG2Z7T3KjNpEwj3fJNX8vSfCX2</td>\n",
              "      <td>15T4xJj6XxyPZWGLPR3S72hD9f9YzUQf36</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>2868964 rows × 2 columns</p>\n",
              "</div>\n",
              "      <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-08f4f543-1ad2-435c-a6df-74e3f0254ecd')\"\n",
              "              title=\"Convert this dataframe to an interactive table.\"\n",
              "              style=\"display:none;\">\n",
              "        \n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
              "    <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
              "  </svg>\n",
              "      </button>\n",
              "      \n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      flex-wrap:wrap;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "      <script>\n",
              "        const buttonEl =\n",
              "          document.querySelector('#df-08f4f543-1ad2-435c-a6df-74e3f0254ecd button.colab-df-convert');\n",
              "        buttonEl.style.display =\n",
              "          google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "        async function convertToInteractive(key) {\n",
              "          const element = document.querySelector('#df-08f4f543-1ad2-435c-a6df-74e3f0254ecd');\n",
              "          const dataTable =\n",
              "            await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                     [key], {});\n",
              "          if (!dataTable) return;\n",
              "\n",
              "          const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "            '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "            + ' to learn more about interactive tables.';\n",
              "          element.innerHTML = '';\n",
              "          dataTable['output_type'] = 'display_data';\n",
              "          await google.colab.output.renderOutput(dataTable, element);\n",
              "          const docLink = document.createElement('div');\n",
              "          docLink.innerHTML = docLinkHtml;\n",
              "          element.appendChild(docLink);\n",
              "        }\n",
              "      </script>\n",
              "    </div>\n",
              "  </div>\n",
              "  "
            ]
          },
          "metadata": {},
          "execution_count": 15
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "Address-Transaction edgelist: \n",
            "\n"
          ]
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "                             input_address       txId\n",
              "0       14YRXHHof4BY1TVxN5FqYPcEdpmXiYT78a  230325127\n",
              "1       13Lhad3SAmu2vqYg2dxbNcxH7LE77kJu2w  230325139\n",
              "2       1MAQQZn7EHP6J3erXByCciFiVcgS8ZhWqz   86875675\n",
              "3       16zs5SVSyADh5WrLNbZbpRLsBsN5uEzgeK  230325147\n",
              "4       1QJpwtUorBKPGUJkSyrRcBKTAHq4CXrdYh  230325154\n",
              "...                                    ...        ...\n",
              "477112   1HdnGvuc21Y4QfBEHUc3NFRJhGywdSFUb  157659046\n",
              "477113  3MfN5to5K5be2RupWE8rjJHQ6V9L8ypWeh  157659306\n",
              "477114  3DzbpEogZ1mn9FgCHcmzYPLDbV9GuxYHpi  157668825\n",
              "477115  34yD1sQg6C16aANCtibYXRj5NsX6tt4v5R  125788182\n",
              "477116  1JERHCgwHG2Z7T3KjNpEwj3fJNX8vSfCX2  157670868\n",
              "\n",
              "[477117 rows x 2 columns]"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-b2263971-8386-4ddb-8b11-40be8645a0ce\">\n",
              "    <div class=\"colab-df-container\">\n",
              "      <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>input_address</th>\n",
              "      <th>txId</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>14YRXHHof4BY1TVxN5FqYPcEdpmXiYT78a</td>\n",
              "      <td>230325127</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>13Lhad3SAmu2vqYg2dxbNcxH7LE77kJu2w</td>\n",
              "      <td>230325139</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>1MAQQZn7EHP6J3erXByCciFiVcgS8ZhWqz</td>\n",
              "      <td>86875675</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>16zs5SVSyADh5WrLNbZbpRLsBsN5uEzgeK</td>\n",
              "      <td>230325147</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>1QJpwtUorBKPGUJkSyrRcBKTAHq4CXrdYh</td>\n",
              "      <td>230325154</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>477112</th>\n",
              "      <td>1HdnGvuc21Y4QfBEHUc3NFRJhGywdSFUb</td>\n",
              "      <td>157659046</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>477113</th>\n",
              "      <td>3MfN5to5K5be2RupWE8rjJHQ6V9L8ypWeh</td>\n",
              "      <td>157659306</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>477114</th>\n",
              "      <td>3DzbpEogZ1mn9FgCHcmzYPLDbV9GuxYHpi</td>\n",
              "      <td>157668825</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>477115</th>\n",
              "      <td>34yD1sQg6C16aANCtibYXRj5NsX6tt4v5R</td>\n",
              "      <td>125788182</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>477116</th>\n",
              "      <td>1JERHCgwHG2Z7T3KjNpEwj3fJNX8vSfCX2</td>\n",
              "      <td>157670868</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>477117 rows × 2 columns</p>\n",
              "</div>\n",
              "      <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-b2263971-8386-4ddb-8b11-40be8645a0ce')\"\n",
              "              title=\"Convert this dataframe to an interactive table.\"\n",
              "              style=\"display:none;\">\n",
              "        \n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
              "    <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
              "  </svg>\n",
              "      </button>\n",
              "      \n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      flex-wrap:wrap;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "      <script>\n",
              "        const buttonEl =\n",
              "          document.querySelector('#df-b2263971-8386-4ddb-8b11-40be8645a0ce button.colab-df-convert');\n",
              "        buttonEl.style.display =\n",
              "          google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "        async function convertToInteractive(key) {\n",
              "          const element = document.querySelector('#df-b2263971-8386-4ddb-8b11-40be8645a0ce');\n",
              "          const dataTable =\n",
              "            await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                     [key], {});\n",
              "          if (!dataTable) return;\n",
              "\n",
              "          const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "            '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "            + ' to learn more about interactive tables.';\n",
              "          element.innerHTML = '';\n",
              "          dataTable['output_type'] = 'display_data';\n",
              "          await google.colab.output.renderOutput(dataTable, element);\n",
              "          const docLink = document.createElement('div');\n",
              "          docLink.innerHTML = docLinkHtml;\n",
              "          element.appendChild(docLink);\n",
              "        }\n",
              "      </script>\n",
              "    </div>\n",
              "  </div>\n",
              "  "
            ]
          },
          "metadata": {},
          "execution_count": 15
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "Transaction-Address edgelist: \n",
            "\n"
          ]
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "             txId                      output_address\n",
              "0       230325127  1GASxu5nMntiRKdVtTVRvEbP965G51bhHH\n",
              "1       230325127  14YRXHHof4BY1TVxN5FqYPcEdpmXiYT78a\n",
              "2       230325139  1GFdrdgtG34GChM8SMpMwcXFc4nYbH1A5G\n",
              "3        86875675  19q57SeCEzTnWrWVXA43nZzhSiXkYggh7c\n",
              "4        86875675  1Kk1NVYnCE8ALXDhgMM6HqTt1jDSvi6QBA\n",
              "...           ...                                 ...\n",
              "837119  157659306  3MfN5to5K5be2RupWE8rjJHQ6V9L8ypWeh\n",
              "837120  157668825  38jMiiZs2C5n5MPkyc5pSA7wwW6H4p6hPa\n",
              "837121  125788182  3G9b7hWZccuft1V4eGUcZqTZaxsqx699bM\n",
              "837122  157670868  1JERHCgwHG2Z7T3KjNpEwj3fJNX8vSfCX2\n",
              "837123  157670868  15T4xJj6XxyPZWGLPR3S72hD9f9YzUQf36\n",
              "\n",
              "[837124 rows x 2 columns]"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-3dacd5a6-2662-44dc-9597-990b7f8098b3\">\n",
              "    <div class=\"colab-df-container\">\n",
              "      <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>txId</th>\n",
              "      <th>output_address</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>230325127</td>\n",
              "      <td>1GASxu5nMntiRKdVtTVRvEbP965G51bhHH</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>230325127</td>\n",
              "      <td>14YRXHHof4BY1TVxN5FqYPcEdpmXiYT78a</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>230325139</td>\n",
              "      <td>1GFdrdgtG34GChM8SMpMwcXFc4nYbH1A5G</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>86875675</td>\n",
              "      <td>19q57SeCEzTnWrWVXA43nZzhSiXkYggh7c</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>86875675</td>\n",
              "      <td>1Kk1NVYnCE8ALXDhgMM6HqTt1jDSvi6QBA</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>837119</th>\n",
              "      <td>157659306</td>\n",
              "      <td>3MfN5to5K5be2RupWE8rjJHQ6V9L8ypWeh</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>837120</th>\n",
              "      <td>157668825</td>\n",
              "      <td>38jMiiZs2C5n5MPkyc5pSA7wwW6H4p6hPa</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>837121</th>\n",
              "      <td>125788182</td>\n",
              "      <td>3G9b7hWZccuft1V4eGUcZqTZaxsqx699bM</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>837122</th>\n",
              "      <td>157670868</td>\n",
              "      <td>1JERHCgwHG2Z7T3KjNpEwj3fJNX8vSfCX2</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>837123</th>\n",
              "      <td>157670868</td>\n",
              "      <td>15T4xJj6XxyPZWGLPR3S72hD9f9YzUQf36</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>837124 rows × 2 columns</p>\n",
              "</div>\n",
              "      <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-3dacd5a6-2662-44dc-9597-990b7f8098b3')\"\n",
              "              title=\"Convert this dataframe to an interactive table.\"\n",
              "              style=\"display:none;\">\n",
              "        \n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
              "    <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
              "  </svg>\n",
              "      </button>\n",
              "      \n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      flex-wrap:wrap;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "      <script>\n",
              "        const buttonEl =\n",
              "          document.querySelector('#df-3dacd5a6-2662-44dc-9597-990b7f8098b3 button.colab-df-convert');\n",
              "        buttonEl.style.display =\n",
              "          google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "        async function convertToInteractive(key) {\n",
              "          const element = document.querySelector('#df-3dacd5a6-2662-44dc-9597-990b7f8098b3');\n",
              "          const dataTable =\n",
              "            await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                     [key], {});\n",
              "          if (!dataTable) return;\n",
              "\n",
              "          const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "            '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "            + ' to learn more about interactive tables.';\n",
              "          element.innerHTML = '';\n",
              "          dataTable['output_type'] = 'display_data';\n",
              "          await google.colab.output.renderOutput(dataTable, element);\n",
              "          const docLink = document.createElement('div');\n",
              "          docLink.innerHTML = docLinkHtml;\n",
              "          element.appendChild(docLink);\n",
              "        }\n",
              "      </script>\n",
              "    </div>\n",
              "  </div>\n",
              "  "
            ]
          },
          "metadata": {},
          "execution_count": 15
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "Data structure for an example actor (address = 39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K):"
      ],
      "metadata": {
        "id": "5Qw43a6xe9rN"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "print(\"\\nwallets_features.csv for address = 39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K\\n\")\n",
        "df_wallets_features[df_wallets_features['address']=='39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K']\n",
        "\n",
        "print(\"\\nwallets_classes.csv for address = 39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K\\n\")\n",
        "df_wallets_classes[df_wallets_classes['address']=='39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K']\n",
        "\n",
        "print(\"\\nAddrAddr_edgelist.csv for address = 39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K0\\n\")\n",
        "df_AddrAddr_edgelist[(df_AddrAddr_edgelist['input_address']=='39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K') | (df_AddrAddr_edgelist['output_address']=='39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K')]\n",
        "\n",
        "print(\"\\nAddrTx_edgelist.csv for address = 39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K0\\n\")\n",
        "df_AddrTx_edgelist[df_AddrTx_edgelist['input_address']=='39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K']\n",
        "\n",
        "print(\"\\nTxAddr_edgelist.csv for address = 39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K0\\n\")\n",
        "df_TxAddr_edgelist[df_TxAddr_edgelist['output_address']=='39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K']"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 1000
        },
        "id": "BHp9b7S1e1-F",
        "outputId": "0fd2f605-9078-4941-ef43-e98e6a67d535"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "wallets_features.csv for address = 39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K\n",
            "\n"
          ]
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "                                    address  Time step  num_txs_as_sender  \\\n",
              "1149250  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K         23              420.0   \n",
              "1149251  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K         23              420.0   \n",
              "1149252  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K         23              420.0   \n",
              "1149253  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K         23              420.0   \n",
              "1149254  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K         24              420.0   \n",
              "...                                     ...        ...                ...   \n",
              "1149666  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K         32              420.0   \n",
              "1149667  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K         32              420.0   \n",
              "1149668  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K         32              420.0   \n",
              "1149669  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K         32              420.0   \n",
              "1149670  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K         32              420.0   \n",
              "\n",
              "         num_txs_as receiver  first_block_appeared_in  last_block_appeared_in  \\\n",
              "1149250                  1.0                 435559.0                453704.0   \n",
              "1149251                  1.0                 435559.0                453704.0   \n",
              "1149252                  1.0                 435559.0                453704.0   \n",
              "1149253                  1.0                 435559.0                453704.0   \n",
              "1149254                  1.0                 435559.0                453704.0   \n",
              "...                      ...                      ...                     ...   \n",
              "1149666                  1.0                 435559.0                453704.0   \n",
              "1149667                  1.0                 435559.0                453704.0   \n",
              "1149668                  1.0                 435559.0                453704.0   \n",
              "1149669                  1.0                 435559.0                453704.0   \n",
              "1149670                  1.0                 435559.0                453704.0   \n",
              "\n",
              "         lifetime_in_blocks  total_txs  first_sent_block  \\\n",
              "1149250             18145.0      421.0          435559.0   \n",
              "1149251             18145.0      421.0          435559.0   \n",
              "1149252             18145.0      421.0          435559.0   \n",
              "1149253             18145.0      421.0          435559.0   \n",
              "1149254             18145.0      421.0          435559.0   \n",
              "...                     ...        ...               ...   \n",
              "1149666             18145.0      421.0          435559.0   \n",
              "1149667             18145.0      421.0          435559.0   \n",
              "1149668             18145.0      421.0          435559.0   \n",
              "1149669             18145.0      421.0          435559.0   \n",
              "1149670             18145.0      421.0          435559.0   \n",
              "\n",
              "         first_received_block  ...  blocks_btwn_output_txs_min  \\\n",
              "1149250              451682.0  ...                         0.0   \n",
              "1149251              451682.0  ...                         0.0   \n",
              "1149252              451682.0  ...                         0.0   \n",
              "1149253              451682.0  ...                         0.0   \n",
              "1149254              451682.0  ...                         0.0   \n",
              "...                       ...  ...                         ...   \n",
              "1149666              451682.0  ...                         0.0   \n",
              "1149667              451682.0  ...                         0.0   \n",
              "1149668              451682.0  ...                         0.0   \n",
              "1149669              451682.0  ...                         0.0   \n",
              "1149670              451682.0  ...                         0.0   \n",
              "\n",
              "         blocks_btwn_output_txs_max  blocks_btwn_output_txs_mean  \\\n",
              "1149250                         0.0                          0.0   \n",
              "1149251                         0.0                          0.0   \n",
              "1149252                         0.0                          0.0   \n",
              "1149253                         0.0                          0.0   \n",
              "1149254                         0.0                          0.0   \n",
              "...                             ...                          ...   \n",
              "1149666                         0.0                          0.0   \n",
              "1149667                         0.0                          0.0   \n",
              "1149668                         0.0                          0.0   \n",
              "1149669                         0.0                          0.0   \n",
              "1149670                         0.0                          0.0   \n",
              "\n",
              "         blocks_btwn_output_txs_median  num_addr_transacted_multiple  \\\n",
              "1149250                            0.0                          17.0   \n",
              "1149251                            0.0                          17.0   \n",
              "1149252                            0.0                          17.0   \n",
              "1149253                            0.0                          17.0   \n",
              "1149254                            0.0                          17.0   \n",
              "...                                ...                           ...   \n",
              "1149666                            0.0                          17.0   \n",
              "1149667                            0.0                          17.0   \n",
              "1149668                            0.0                          17.0   \n",
              "1149669                            0.0                          17.0   \n",
              "1149670                            0.0                          17.0   \n",
              "\n",
              "         transacted_w_address_total  transacted_w_address_min  \\\n",
              "1149250                       495.0                       1.0   \n",
              "1149251                       495.0                       1.0   \n",
              "1149252                       495.0                       1.0   \n",
              "1149253                       495.0                       1.0   \n",
              "1149254                       495.0                       1.0   \n",
              "...                             ...                       ...   \n",
              "1149666                       495.0                       1.0   \n",
              "1149667                       495.0                       1.0   \n",
              "1149668                       495.0                       1.0   \n",
              "1149669                       495.0                       1.0   \n",
              "1149670                       495.0                       1.0   \n",
              "\n",
              "         transacted_w_address_max  transacted_w_address_mean  \\\n",
              "1149250                       3.0                   1.046512   \n",
              "1149251                       3.0                   1.046512   \n",
              "1149252                       3.0                   1.046512   \n",
              "1149253                       3.0                   1.046512   \n",
              "1149254                       3.0                   1.046512   \n",
              "...                           ...                        ...   \n",
              "1149666                       3.0                   1.046512   \n",
              "1149667                       3.0                   1.046512   \n",
              "1149668                       3.0                   1.046512   \n",
              "1149669                       3.0                   1.046512   \n",
              "1149670                       3.0                   1.046512   \n",
              "\n",
              "         transacted_w_address_median  \n",
              "1149250                          1.0  \n",
              "1149251                          1.0  \n",
              "1149252                          1.0  \n",
              "1149253                          1.0  \n",
              "1149254                          1.0  \n",
              "...                              ...  \n",
              "1149666                          1.0  \n",
              "1149667                          1.0  \n",
              "1149668                          1.0  \n",
              "1149669                          1.0  \n",
              "1149670                          1.0  \n",
              "\n",
              "[421 rows x 57 columns]"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-2f201a3b-9a7a-41b3-9830-a75d1c614310\">\n",
              "    <div class=\"colab-df-container\">\n",
              "      <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>address</th>\n",
              "      <th>Time step</th>\n",
              "      <th>num_txs_as_sender</th>\n",
              "      <th>num_txs_as receiver</th>\n",
              "      <th>first_block_appeared_in</th>\n",
              "      <th>last_block_appeared_in</th>\n",
              "      <th>lifetime_in_blocks</th>\n",
              "      <th>total_txs</th>\n",
              "      <th>first_sent_block</th>\n",
              "      <th>first_received_block</th>\n",
              "      <th>...</th>\n",
              "      <th>blocks_btwn_output_txs_min</th>\n",
              "      <th>blocks_btwn_output_txs_max</th>\n",
              "      <th>blocks_btwn_output_txs_mean</th>\n",
              "      <th>blocks_btwn_output_txs_median</th>\n",
              "      <th>num_addr_transacted_multiple</th>\n",
              "      <th>transacted_w_address_total</th>\n",
              "      <th>transacted_w_address_min</th>\n",
              "      <th>transacted_w_address_max</th>\n",
              "      <th>transacted_w_address_mean</th>\n",
              "      <th>transacted_w_address_median</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>1149250</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>23</td>\n",
              "      <td>420.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>453704.0</td>\n",
              "      <td>18145.0</td>\n",
              "      <td>421.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>451682.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>17.0</td>\n",
              "      <td>495.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>3.0</td>\n",
              "      <td>1.046512</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1149251</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>23</td>\n",
              "      <td>420.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>453704.0</td>\n",
              "      <td>18145.0</td>\n",
              "      <td>421.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>451682.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>17.0</td>\n",
              "      <td>495.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>3.0</td>\n",
              "      <td>1.046512</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1149252</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>23</td>\n",
              "      <td>420.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>453704.0</td>\n",
              "      <td>18145.0</td>\n",
              "      <td>421.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>451682.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>17.0</td>\n",
              "      <td>495.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>3.0</td>\n",
              "      <td>1.046512</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1149253</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>23</td>\n",
              "      <td>420.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>453704.0</td>\n",
              "      <td>18145.0</td>\n",
              "      <td>421.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>451682.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>17.0</td>\n",
              "      <td>495.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>3.0</td>\n",
              "      <td>1.046512</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1149254</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>24</td>\n",
              "      <td>420.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>453704.0</td>\n",
              "      <td>18145.0</td>\n",
              "      <td>421.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>451682.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>17.0</td>\n",
              "      <td>495.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>3.0</td>\n",
              "      <td>1.046512</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1149666</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>32</td>\n",
              "      <td>420.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>453704.0</td>\n",
              "      <td>18145.0</td>\n",
              "      <td>421.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>451682.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>17.0</td>\n",
              "      <td>495.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>3.0</td>\n",
              "      <td>1.046512</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1149667</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>32</td>\n",
              "      <td>420.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>453704.0</td>\n",
              "      <td>18145.0</td>\n",
              "      <td>421.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>451682.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>17.0</td>\n",
              "      <td>495.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>3.0</td>\n",
              "      <td>1.046512</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1149668</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>32</td>\n",
              "      <td>420.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>453704.0</td>\n",
              "      <td>18145.0</td>\n",
              "      <td>421.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>451682.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>17.0</td>\n",
              "      <td>495.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>3.0</td>\n",
              "      <td>1.046512</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1149669</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>32</td>\n",
              "      <td>420.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>453704.0</td>\n",
              "      <td>18145.0</td>\n",
              "      <td>421.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>451682.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>17.0</td>\n",
              "      <td>495.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>3.0</td>\n",
              "      <td>1.046512</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1149670</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>32</td>\n",
              "      <td>420.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>453704.0</td>\n",
              "      <td>18145.0</td>\n",
              "      <td>421.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>451682.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>17.0</td>\n",
              "      <td>495.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>3.0</td>\n",
              "      <td>1.046512</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>421 rows × 57 columns</p>\n",
              "</div>\n",
              "      <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-2f201a3b-9a7a-41b3-9830-a75d1c614310')\"\n",
              "              title=\"Convert this dataframe to an interactive table.\"\n",
              "              style=\"display:none;\">\n",
              "        \n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
              "    <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
              "  </svg>\n",
              "      </button>\n",
              "      \n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      flex-wrap:wrap;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "      <script>\n",
              "        const buttonEl =\n",
              "          document.querySelector('#df-2f201a3b-9a7a-41b3-9830-a75d1c614310 button.colab-df-convert');\n",
              "        buttonEl.style.display =\n",
              "          google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "        async function convertToInteractive(key) {\n",
              "          const element = document.querySelector('#df-2f201a3b-9a7a-41b3-9830-a75d1c614310');\n",
              "          const dataTable =\n",
              "            await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                     [key], {});\n",
              "          if (!dataTable) return;\n",
              "\n",
              "          const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "            '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "            + ' to learn more about interactive tables.';\n",
              "          element.innerHTML = '';\n",
              "          dataTable['output_type'] = 'display_data';\n",
              "          await google.colab.output.renderOutput(dataTable, element);\n",
              "          const docLink = document.createElement('div');\n",
              "          docLink.innerHTML = docLinkHtml;\n",
              "          element.appendChild(docLink);\n",
              "        }\n",
              "      </script>\n",
              "    </div>\n",
              "  </div>\n",
              "  "
            ]
          },
          "metadata": {},
          "execution_count": 6
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "wallets_classes.csv for address = 39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K\n",
            "\n"
          ]
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "                                   address  class\n",
              "745591  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K      1"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-c4d5eff0-a0ed-4804-a4b9-3defda4ff7a5\">\n",
              "    <div class=\"colab-df-container\">\n",
              "      <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>address</th>\n",
              "      <th>class</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>745591</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>1</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>\n",
              "      <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-c4d5eff0-a0ed-4804-a4b9-3defda4ff7a5')\"\n",
              "              title=\"Convert this dataframe to an interactive table.\"\n",
              "              style=\"display:none;\">\n",
              "        \n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
              "    <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
              "  </svg>\n",
              "      </button>\n",
              "      \n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      flex-wrap:wrap;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "      <script>\n",
              "        const buttonEl =\n",
              "          document.querySelector('#df-c4d5eff0-a0ed-4804-a4b9-3defda4ff7a5 button.colab-df-convert');\n",
              "        buttonEl.style.display =\n",
              "          google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "        async function convertToInteractive(key) {\n",
              "          const element = document.querySelector('#df-c4d5eff0-a0ed-4804-a4b9-3defda4ff7a5');\n",
              "          const dataTable =\n",
              "            await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                     [key], {});\n",
              "          if (!dataTable) return;\n",
              "\n",
              "          const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "            '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "            + ' to learn more about interactive tables.';\n",
              "          element.innerHTML = '';\n",
              "          dataTable['output_type'] = 'display_data';\n",
              "          await google.colab.output.renderOutput(dataTable, element);\n",
              "          const docLink = document.createElement('div');\n",
              "          docLink.innerHTML = docLinkHtml;\n",
              "          element.appendChild(docLink);\n",
              "        }\n",
              "      </script>\n",
              "    </div>\n",
              "  </div>\n",
              "  "
            ]
          },
          "metadata": {},
          "execution_count": 6
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "AddrAddr_edgelist.csv for address = 39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K0\n",
            "\n"
          ]
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "                              input_address  \\\n",
              "1317522  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K   \n",
              "1317523  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K   \n",
              "1317634  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K   \n",
              "1317635  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K   \n",
              "1317644  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K   \n",
              "...                                     ...   \n",
              "1592119  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K   \n",
              "1592120  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K   \n",
              "1592121  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K   \n",
              "1592122  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K   \n",
              "1592123  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K   \n",
              "\n",
              "                             output_address  \n",
              "1317522  131fHSzsK1eQJp7bC94JVWZqJ2JcdR5UfS  \n",
              "1317523  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K  \n",
              "1317634  1FCw4XNAP6xeWMF4o3RaNENguE9qFumgpn  \n",
              "1317635  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K  \n",
              "1317644  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K  \n",
              "...                                     ...  \n",
              "1592119  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K  \n",
              "1592120  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K  \n",
              "1592121  32ZkfqSGoxdx5UGo8YQp1tFhSv8R982Usk  \n",
              "1592122  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K  \n",
              "1592123  1KVqB5L93xNQ387NkNZc6rkx4p4HaWpZa9  \n",
              "\n",
              "[915 rows x 2 columns]"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-b897a655-d488-4453-8490-eeed66b3abc0\">\n",
              "    <div class=\"colab-df-container\">\n",
              "      <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>input_address</th>\n",
              "      <th>output_address</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>1317522</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>131fHSzsK1eQJp7bC94JVWZqJ2JcdR5UfS</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1317523</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1317634</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>1FCw4XNAP6xeWMF4o3RaNENguE9qFumgpn</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1317635</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1317644</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1592119</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1592120</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1592121</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>32ZkfqSGoxdx5UGo8YQp1tFhSv8R982Usk</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1592122</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1592123</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>1KVqB5L93xNQ387NkNZc6rkx4p4HaWpZa9</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>915 rows × 2 columns</p>\n",
              "</div>\n",
              "      <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-b897a655-d488-4453-8490-eeed66b3abc0')\"\n",
              "              title=\"Convert this dataframe to an interactive table.\"\n",
              "              style=\"display:none;\">\n",
              "        \n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
              "    <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
              "  </svg>\n",
              "      </button>\n",
              "      \n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      flex-wrap:wrap;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "      <script>\n",
              "        const buttonEl =\n",
              "          document.querySelector('#df-b897a655-d488-4453-8490-eeed66b3abc0 button.colab-df-convert');\n",
              "        buttonEl.style.display =\n",
              "          google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "        async function convertToInteractive(key) {\n",
              "          const element = document.querySelector('#df-b897a655-d488-4453-8490-eeed66b3abc0');\n",
              "          const dataTable =\n",
              "            await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                     [key], {});\n",
              "          if (!dataTable) return;\n",
              "\n",
              "          const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "            '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "            + ' to learn more about interactive tables.';\n",
              "          element.innerHTML = '';\n",
              "          dataTable['output_type'] = 'display_data';\n",
              "          await google.colab.output.renderOutput(dataTable, element);\n",
              "          const docLink = document.createElement('div');\n",
              "          docLink.innerHTML = docLinkHtml;\n",
              "          element.appendChild(docLink);\n",
              "        }\n",
              "      </script>\n",
              "    </div>\n",
              "  </div>\n",
              "  "
            ]
          },
          "metadata": {},
          "execution_count": 6
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "AddrTx_edgelist.csv for address = 39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K0\n",
            "\n"
          ]
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "                             input_address       txId\n",
              "235194  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K  291338524\n",
              "235250  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K   88250674\n",
              "235255  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K  331553508\n",
              "235256  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K  331553509\n",
              "239085  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K  289228146\n",
              "...                                    ...        ...\n",
              "298647  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K  355110135\n",
              "298648  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K  355110139\n",
              "298649  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K  343635736\n",
              "298650  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K  355110144\n",
              "298651  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K   69064953\n",
              "\n",
              "[420 rows x 2 columns]"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-5ac14163-594a-46f3-895b-92a0f8d50223\">\n",
              "    <div class=\"colab-df-container\">\n",
              "      <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>input_address</th>\n",
              "      <th>txId</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>235194</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>291338524</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>235250</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>88250674</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>235255</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>331553508</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>235256</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>331553509</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>239085</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>289228146</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>298647</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>355110135</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>298648</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>355110139</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>298649</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>343635736</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>298650</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>355110144</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>298651</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>69064953</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>420 rows × 2 columns</p>\n",
              "</div>\n",
              "      <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-5ac14163-594a-46f3-895b-92a0f8d50223')\"\n",
              "              title=\"Convert this dataframe to an interactive table.\"\n",
              "              style=\"display:none;\">\n",
              "        \n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
              "    <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
              "  </svg>\n",
              "      </button>\n",
              "      \n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      flex-wrap:wrap;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "      <script>\n",
              "        const buttonEl =\n",
              "          document.querySelector('#df-5ac14163-594a-46f3-895b-92a0f8d50223 button.colab-df-convert');\n",
              "        buttonEl.style.display =\n",
              "          google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "        async function convertToInteractive(key) {\n",
              "          const element = document.querySelector('#df-5ac14163-594a-46f3-895b-92a0f8d50223');\n",
              "          const dataTable =\n",
              "            await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                     [key], {});\n",
              "          if (!dataTable) return;\n",
              "\n",
              "          const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "            '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "            + ' to learn more about interactive tables.';\n",
              "          element.innerHTML = '';\n",
              "          dataTable['output_type'] = 'display_data';\n",
              "          await google.colab.output.renderOutput(dataTable, element);\n",
              "          const docLink = document.createElement('div');\n",
              "          docLink.innerHTML = docLinkHtml;\n",
              "          element.appendChild(docLink);\n",
              "        }\n",
              "      </script>\n",
              "    </div>\n",
              "  </div>\n",
              "  "
            ]
          },
          "metadata": {},
          "execution_count": 6
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "TxAddr_edgelist.csv for address = 39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K0\n",
            "\n"
          ]
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "             txId                      output_address\n",
              "431088  291338524  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K\n",
              "431200   88250674  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K\n",
              "431209  331553508  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K\n",
              "431212  331553509  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K\n",
              "436269  289228146  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K\n",
              "...           ...                                 ...\n",
              "539069  355110135  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K\n",
              "539071  355110139  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K\n",
              "539073  343635736  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K\n",
              "539074  355110144  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K\n",
              "539076   69064953  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K\n",
              "\n",
              "[421 rows x 2 columns]"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-3bf84449-5f74-4e0f-b362-27653c819b48\">\n",
              "    <div class=\"colab-df-container\">\n",
              "      <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>txId</th>\n",
              "      <th>output_address</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>431088</th>\n",
              "      <td>291338524</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>431200</th>\n",
              "      <td>88250674</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>431209</th>\n",
              "      <td>331553508</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>431212</th>\n",
              "      <td>331553509</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>436269</th>\n",
              "      <td>289228146</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>539069</th>\n",
              "      <td>355110135</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>539071</th>\n",
              "      <td>355110139</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>539073</th>\n",
              "      <td>343635736</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>539074</th>\n",
              "      <td>355110144</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>539076</th>\n",
              "      <td>69064953</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>421 rows × 2 columns</p>\n",
              "</div>\n",
              "      <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-3bf84449-5f74-4e0f-b362-27653c819b48')\"\n",
              "              title=\"Convert this dataframe to an interactive table.\"\n",
              "              style=\"display:none;\">\n",
              "        \n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
              "    <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
              "  </svg>\n",
              "      </button>\n",
              "      \n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      flex-wrap:wrap;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "      <script>\n",
              "        const buttonEl =\n",
              "          document.querySelector('#df-3bf84449-5f74-4e0f-b362-27653c819b48 button.colab-df-convert');\n",
              "        buttonEl.style.display =\n",
              "          google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "        async function convertToInteractive(key) {\n",
              "          const element = document.querySelector('#df-3bf84449-5f74-4e0f-b362-27653c819b48');\n",
              "          const dataTable =\n",
              "            await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                     [key], {});\n",
              "          if (!dataTable) return;\n",
              "\n",
              "          const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "            '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "            + ' to learn more about interactive tables.';\n",
              "          element.innerHTML = '';\n",
              "          dataTable['output_type'] = 'display_data';\n",
              "          await google.colab.output.renderOutput(dataTable, element);\n",
              "          const docLink = document.createElement('div');\n",
              "          docLink.innerHTML = docLinkHtml;\n",
              "          element.appendChild(docLink);\n",
              "        }\n",
              "      </script>\n",
              "    </div>\n",
              "  </div>\n",
              "  "
            ]
          },
          "metadata": {},
          "execution_count": 6
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "\n",
        "Actors features --- class, 28 transaction-related features, 27 time-related features:\n",
        "\n",
        "![actors_features.png]()\n"
      ],
      "metadata": {
        "id": "moS6bxoLg1Pk"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "df_wallets_features.columns"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "RpljxgT7k49T",
        "outputId": "ee920f81-831e-411b-e840-5aaae0c6e018"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "Index(['address', 'Time step', 'num_txs_as_sender', 'num_txs_as receiver',\n",
              "       'first_block_appeared_in', 'last_block_appeared_in',\n",
              "       'lifetime_in_blocks', 'total_txs', 'first_sent_block',\n",
              "       'first_received_block', 'num_timesteps_appeared_in',\n",
              "       'btc_transacted_total', 'btc_transacted_min', 'btc_transacted_max',\n",
              "       'btc_transacted_mean', 'btc_transacted_median', 'btc_sent_total',\n",
              "       'btc_sent_min', 'btc_sent_max', 'btc_sent_mean', 'btc_sent_median',\n",
              "       'btc_received_total', 'btc_received_min', 'btc_received_max',\n",
              "       'btc_received_mean', 'btc_received_median', 'fees_total', 'fees_min',\n",
              "       'fees_max', 'fees_mean', 'fees_median', 'fees_as_share_total',\n",
              "       'fees_as_share_min', 'fees_as_share_max', 'fees_as_share_mean',\n",
              "       'fees_as_share_median', 'blocks_btwn_txs_total', 'blocks_btwn_txs_min',\n",
              "       'blocks_btwn_txs_max', 'blocks_btwn_txs_mean', 'blocks_btwn_txs_median',\n",
              "       'blocks_btwn_input_txs_total', 'blocks_btwn_input_txs_min',\n",
              "       'blocks_btwn_input_txs_max', 'blocks_btwn_input_txs_mean',\n",
              "       'blocks_btwn_input_txs_median', 'blocks_btwn_output_txs_total',\n",
              "       'blocks_btwn_output_txs_min', 'blocks_btwn_output_txs_max',\n",
              "       'blocks_btwn_output_txs_mean', 'blocks_btwn_output_txs_median',\n",
              "       'num_addr_transacted_multiple', 'transacted_w_address_total',\n",
              "       'transacted_w_address_min', 'transacted_w_address_max',\n",
              "       'transacted_w_address_mean', 'transacted_w_address_median'],\n",
              "      dtype='object')"
            ]
          },
          "metadata": {},
          "execution_count": 8
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [],
      "metadata": {
        "id": "LLgHsC-abwGa"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "## Machine Learning Model Classification\n",
        "\n",
        "\n",
        "---\n",
        "\n",
        "This section does data preprocessing, creates the training and testing sets, and runs the Logistic Regression, Random Forest, Multilayer Perceptrons, and XGBoost models as well as the ensembles on the dataset.\n",
        "<br>\n",
        "\n",
        "It's important to note that 2 types of classifications can be done: (i) classify addresses using their features, (ii) classify addresses across time steps using their features and temporal interactions. The former is more intuitive, thus, shown in this tutorial. \n"
      ],
      "metadata": {
        "id": "_3cwbmq8oi6-"
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "Create set of addresses, their class label, and all their features for classification of (i) from above:"
      ],
      "metadata": {
        "id": "9g-EEKP0H7tp"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "df_wallets_classification = df_wallets_features_classes_combined\n",
        "df_wallets_classification = df_wallets_classification.drop(columns=['Time step']).drop_duplicates()\n",
        "df_wallets_classification"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 505
        },
        "id": "I73DkK_MH7QY",
        "outputId": "afda0a81-246a-4ebb-94a7-773d406b0bc5"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "                                    address  class  num_txs_as_sender  \\\n",
              "0         111112TykSw72ztDN2WJger4cynzWYC5w      2                0.0   \n",
              "1         1111DAYXhoxZx2tsRnzimfozo783x1yC2      3                0.0   \n",
              "9          1111VHuXEzHaRCgXbVwojtaP7Co3QABb      2                0.0   \n",
              "10       111218KKkh1JJFRHbwM16AwCiVCc4m7he1      3                1.0   \n",
              "12        1115LWW3xsD9jT9VRY7viCN9S34RVAAuA      2                0.0   \n",
              "...                                     ...    ...                ...   \n",
              "1268254  3R2Uw5MRdSSigp8AjfT7K5es6Hupm4qLSq      3                1.0   \n",
              "1268256  3R2VBFbqHGC4bQ7b4ixN4jZTdv7RMbEYtf      3                0.0   \n",
              "1268257  3R2WFmRwbDeo3rMVVu5J3jjMxAuQYYWAid      3                0.0   \n",
              "1268258  3R2WTZGYLmbJQyoDSBftJsPRvF1mSEtkh6      3                0.0   \n",
              "1268259  3R2bm6iqbzcVpEeFCSFarS56b56QfjyiSW      3                1.0   \n",
              "\n",
              "         num_txs_as receiver  first_block_appeared_in  last_block_appeared_in  \\\n",
              "0                        1.0                 439586.0                439586.0   \n",
              "1                        8.0                 439589.0                485959.0   \n",
              "9                        1.0                 431522.0                431522.0   \n",
              "10                       1.0                 423456.0                423456.0   \n",
              "12                       1.0                 429513.0                429513.0   \n",
              "...                      ...                      ...                     ...   \n",
              "1268254                  1.0                 451684.0                451685.0   \n",
              "1268256                  1.0                 477895.0                477895.0   \n",
              "1268257                  1.0                 407342.0                407342.0   \n",
              "1268258                  1.0                 395235.0                395235.0   \n",
              "1268259                  0.0                 407333.0                407333.0   \n",
              "\n",
              "         lifetime_in_blocks  total_txs  first_sent_block  \\\n",
              "0                       0.0        1.0               0.0   \n",
              "1                   46370.0        8.0               0.0   \n",
              "9                       0.0        1.0               0.0   \n",
              "10                      0.0        2.0          423456.0   \n",
              "12                      0.0        1.0               0.0   \n",
              "...                     ...        ...               ...   \n",
              "1268254                 1.0        2.0          451685.0   \n",
              "1268256                 0.0        1.0               0.0   \n",
              "1268257                 0.0        1.0               0.0   \n",
              "1268258                 0.0        1.0               0.0   \n",
              "1268259                 0.0        1.0          407333.0   \n",
              "\n",
              "         first_received_block  ...  blocks_btwn_output_txs_min  \\\n",
              "0                    439586.0  ...                         0.0   \n",
              "1                    439589.0  ...                         0.0   \n",
              "9                    431522.0  ...                         0.0   \n",
              "10                   423456.0  ...                         0.0   \n",
              "12                   429513.0  ...                         0.0   \n",
              "...                       ...  ...                         ...   \n",
              "1268254              451684.0  ...                         0.0   \n",
              "1268256              477895.0  ...                         0.0   \n",
              "1268257              407342.0  ...                         0.0   \n",
              "1268258              395235.0  ...                         0.0   \n",
              "1268259                   0.0  ...                         0.0   \n",
              "\n",
              "         blocks_btwn_output_txs_max  blocks_btwn_output_txs_mean  \\\n",
              "0                               0.0                     0.000000   \n",
              "1                           20164.0                  6624.285714   \n",
              "9                               0.0                     0.000000   \n",
              "10                              0.0                     0.000000   \n",
              "12                              0.0                     0.000000   \n",
              "...                             ...                          ...   \n",
              "1268254                         0.0                     0.000000   \n",
              "1268256                         0.0                     0.000000   \n",
              "1268257                         0.0                     0.000000   \n",
              "1268258                         0.0                     0.000000   \n",
              "1268259                         0.0                     0.000000   \n",
              "\n",
              "         blocks_btwn_output_txs_median  num_addr_transacted_multiple  \\\n",
              "0                                  0.0                           0.0   \n",
              "1                               8060.0                           0.0   \n",
              "9                                  0.0                           0.0   \n",
              "10                                 0.0                           0.0   \n",
              "12                                 0.0                           0.0   \n",
              "...                                ...                           ...   \n",
              "1268254                            0.0                           0.0   \n",
              "1268256                            0.0                           0.0   \n",
              "1268257                            0.0                           0.0   \n",
              "1268258                            0.0                           0.0   \n",
              "1268259                            0.0                           0.0   \n",
              "\n",
              "         transacted_w_address_total  transacted_w_address_min  \\\n",
              "0                              24.0                       1.0   \n",
              "1                               8.0                       1.0   \n",
              "9                               1.0                       1.0   \n",
              "10                              4.0                       1.0   \n",
              "12                              5.0                       1.0   \n",
              "...                             ...                       ...   \n",
              "1268254                         3.0                       1.0   \n",
              "1268256                         1.0                       1.0   \n",
              "1268257                         1.0                       1.0   \n",
              "1268258                         1.0                       1.0   \n",
              "1268259                         1.0                       1.0   \n",
              "\n",
              "         transacted_w_address_max  transacted_w_address_mean  \\\n",
              "0                             1.0                        1.0   \n",
              "1                             1.0                        1.0   \n",
              "9                             1.0                        1.0   \n",
              "10                            1.0                        1.0   \n",
              "12                            1.0                        1.0   \n",
              "...                           ...                        ...   \n",
              "1268254                       1.0                        1.0   \n",
              "1268256                       1.0                        1.0   \n",
              "1268257                       1.0                        1.0   \n",
              "1268258                       1.0                        1.0   \n",
              "1268259                       1.0                        1.0   \n",
              "\n",
              "         transacted_w_address_median  \n",
              "0                                1.0  \n",
              "1                                1.0  \n",
              "9                                1.0  \n",
              "10                               1.0  \n",
              "12                               1.0  \n",
              "...                              ...  \n",
              "1268254                          1.0  \n",
              "1268256                          1.0  \n",
              "1268257                          1.0  \n",
              "1268258                          1.0  \n",
              "1268259                          1.0  \n",
              "\n",
              "[822942 rows x 57 columns]"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-ab610d49-ea28-4b35-a603-b02a1b977297\">\n",
              "    <div class=\"colab-df-container\">\n",
              "      <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>address</th>\n",
              "      <th>class</th>\n",
              "      <th>num_txs_as_sender</th>\n",
              "      <th>num_txs_as receiver</th>\n",
              "      <th>first_block_appeared_in</th>\n",
              "      <th>last_block_appeared_in</th>\n",
              "      <th>lifetime_in_blocks</th>\n",
              "      <th>total_txs</th>\n",
              "      <th>first_sent_block</th>\n",
              "      <th>first_received_block</th>\n",
              "      <th>...</th>\n",
              "      <th>blocks_btwn_output_txs_min</th>\n",
              "      <th>blocks_btwn_output_txs_max</th>\n",
              "      <th>blocks_btwn_output_txs_mean</th>\n",
              "      <th>blocks_btwn_output_txs_median</th>\n",
              "      <th>num_addr_transacted_multiple</th>\n",
              "      <th>transacted_w_address_total</th>\n",
              "      <th>transacted_w_address_min</th>\n",
              "      <th>transacted_w_address_max</th>\n",
              "      <th>transacted_w_address_mean</th>\n",
              "      <th>transacted_w_address_median</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>111112TykSw72ztDN2WJger4cynzWYC5w</td>\n",
              "      <td>2</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>439586.0</td>\n",
              "      <td>439586.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>439586.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>24.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>1111DAYXhoxZx2tsRnzimfozo783x1yC2</td>\n",
              "      <td>3</td>\n",
              "      <td>0.0</td>\n",
              "      <td>8.0</td>\n",
              "      <td>439589.0</td>\n",
              "      <td>485959.0</td>\n",
              "      <td>46370.0</td>\n",
              "      <td>8.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>439589.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>20164.0</td>\n",
              "      <td>6624.285714</td>\n",
              "      <td>8060.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>8.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>9</th>\n",
              "      <td>1111VHuXEzHaRCgXbVwojtaP7Co3QABb</td>\n",
              "      <td>2</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>431522.0</td>\n",
              "      <td>431522.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>431522.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>10</th>\n",
              "      <td>111218KKkh1JJFRHbwM16AwCiVCc4m7he1</td>\n",
              "      <td>3</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>423456.0</td>\n",
              "      <td>423456.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>2.0</td>\n",
              "      <td>423456.0</td>\n",
              "      <td>423456.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>4.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>12</th>\n",
              "      <td>1115LWW3xsD9jT9VRY7viCN9S34RVAAuA</td>\n",
              "      <td>2</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>429513.0</td>\n",
              "      <td>429513.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>429513.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>5.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1268254</th>\n",
              "      <td>3R2Uw5MRdSSigp8AjfT7K5es6Hupm4qLSq</td>\n",
              "      <td>3</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>451684.0</td>\n",
              "      <td>451685.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>2.0</td>\n",
              "      <td>451685.0</td>\n",
              "      <td>451684.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>3.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1268256</th>\n",
              "      <td>3R2VBFbqHGC4bQ7b4ixN4jZTdv7RMbEYtf</td>\n",
              "      <td>3</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>477895.0</td>\n",
              "      <td>477895.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>477895.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1268257</th>\n",
              "      <td>3R2WFmRwbDeo3rMVVu5J3jjMxAuQYYWAid</td>\n",
              "      <td>3</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>407342.0</td>\n",
              "      <td>407342.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>407342.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1268258</th>\n",
              "      <td>3R2WTZGYLmbJQyoDSBftJsPRvF1mSEtkh6</td>\n",
              "      <td>3</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>395235.0</td>\n",
              "      <td>395235.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>395235.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1268259</th>\n",
              "      <td>3R2bm6iqbzcVpEeFCSFarS56b56QfjyiSW</td>\n",
              "      <td>3</td>\n",
              "      <td>1.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>407333.0</td>\n",
              "      <td>407333.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>407333.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>822942 rows × 57 columns</p>\n",
              "</div>\n",
              "      <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-ab610d49-ea28-4b35-a603-b02a1b977297')\"\n",
              "              title=\"Convert this dataframe to an interactive table.\"\n",
              "              style=\"display:none;\">\n",
              "        \n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
              "    <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
              "  </svg>\n",
              "      </button>\n",
              "      \n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      flex-wrap:wrap;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "      <script>\n",
              "        const buttonEl =\n",
              "          document.querySelector('#df-ab610d49-ea28-4b35-a603-b02a1b977297 button.colab-df-convert');\n",
              "        buttonEl.style.display =\n",
              "          google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "        async function convertToInteractive(key) {\n",
              "          const element = document.querySelector('#df-ab610d49-ea28-4b35-a603-b02a1b977297');\n",
              "          const dataTable =\n",
              "            await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                     [key], {});\n",
              "          if (!dataTable) return;\n",
              "\n",
              "          const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "            '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "            + ' to learn more about interactive tables.';\n",
              "          element.innerHTML = '';\n",
              "          dataTable['output_type'] = 'display_data';\n",
              "          await google.colab.output.renderOutput(dataTable, element);\n",
              "          const docLink = document.createElement('div');\n",
              "          docLink.innerHTML = docLinkHtml;\n",
              "          element.appendChild(docLink);\n",
              "        }\n",
              "      </script>\n",
              "    </div>\n",
              "  </div>\n",
              "  "
            ]
          },
          "metadata": {},
          "execution_count": 133
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "Data transformation on the features using MinMaxScaler:"
      ],
      "metadata": {
        "id": "r2jcou5LpnWY"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "for column in df_wallets_classification.columns[2:]:\n",
        "    feature = np.array(df_wallets_classification[column]).reshape(-1,1)\n",
        "    scaler = MinMaxScaler()\n",
        "    scaler.fit(feature)\n",
        "    feature_scaled = scaler.transform(feature)\n",
        "    df_wallets_classification[column] = feature_scaled.reshape(1,-1)[0]\n",
        "\n",
        "df_wallets_classification"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 523
        },
        "id": "CI_cLQf1nM9d",
        "outputId": "e9bfced3-88f9-4e12-9b96-0699eef5a515"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "MinMaxScaler()"
            ]
          },
          "metadata": {},
          "execution_count": 134
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "                                    address  class  num_txs_as_sender  \\\n",
              "0         111112TykSw72ztDN2WJger4cynzWYC5w      2           0.000000   \n",
              "1         1111DAYXhoxZx2tsRnzimfozo783x1yC2      3           0.000000   \n",
              "9          1111VHuXEzHaRCgXbVwojtaP7Co3QABb      2           0.000000   \n",
              "10       111218KKkh1JJFRHbwM16AwCiVCc4m7he1      3           0.000688   \n",
              "12        1115LWW3xsD9jT9VRY7viCN9S34RVAAuA      2           0.000000   \n",
              "...                                     ...    ...                ...   \n",
              "1268254  3R2Uw5MRdSSigp8AjfT7K5es6Hupm4qLSq      3           0.000688   \n",
              "1268256  3R2VBFbqHGC4bQ7b4ixN4jZTdv7RMbEYtf      3           0.000000   \n",
              "1268257  3R2WFmRwbDeo3rMVVu5J3jjMxAuQYYWAid      3           0.000000   \n",
              "1268258  3R2WTZGYLmbJQyoDSBftJsPRvF1mSEtkh6      3           0.000000   \n",
              "1268259  3R2bm6iqbzcVpEeFCSFarS56b56QfjyiSW      3           0.000688   \n",
              "\n",
              "         num_txs_as receiver  first_block_appeared_in  last_block_appeared_in  \\\n",
              "0                   0.001825                 0.499985                0.499985   \n",
              "1                   0.014599                 0.500015                0.979168   \n",
              "9                   0.001825                 0.416657                0.416657   \n",
              "10                  0.001825                 0.333309                0.333309   \n",
              "12                  0.001825                 0.395898                0.395898   \n",
              "...                      ...                      ...                     ...   \n",
              "1268254             0.001825                 0.624996                0.625006   \n",
              "1268256             0.001825                 0.895841                0.895841   \n",
              "1268257             0.001825                 0.166799                0.166799   \n",
              "1268258             0.001825                 0.041695                0.041695   \n",
              "1268259             0.000000                 0.166706                0.166706   \n",
              "\n",
              "         lifetime_in_blocks  total_txs  first_sent_block  \\\n",
              "0                  0.000000   0.000000          0.000000   \n",
              "1                  0.479153   0.004762          0.000000   \n",
              "9                  0.000000   0.000000          0.000000   \n",
              "10                 0.000000   0.000680          0.867782   \n",
              "12                 0.000000   0.000000          0.000000   \n",
              "...                     ...        ...               ...   \n",
              "1268254            0.000010   0.000680          0.925631   \n",
              "1268256            0.000000   0.000000          0.000000   \n",
              "1268257            0.000000   0.000000          0.000000   \n",
              "1268258            0.000000   0.000000          0.000000   \n",
              "1268259            0.000000   0.000000          0.834742   \n",
              "\n",
              "         first_received_block  ...  blocks_btwn_output_txs_min  \\\n",
              "0                    0.900837  ...                         0.0   \n",
              "1                    0.900843  ...                         0.0   \n",
              "9                    0.884312  ...                         0.0   \n",
              "10                   0.867782  ...                         0.0   \n",
              "12                   0.880195  ...                         0.0   \n",
              "...                       ...  ...                         ...   \n",
              "1268254              0.925629  ...                         0.0   \n",
              "1268256              0.979343  ...                         0.0   \n",
              "1268257              0.834760  ...                         0.0   \n",
              "1268258              0.809949  ...                         0.0   \n",
              "1268259              0.000000  ...                         0.0   \n",
              "\n",
              "         blocks_btwn_output_txs_max  blocks_btwn_output_txs_mean  \\\n",
              "0                          0.000000                     0.000000   \n",
              "1                          0.208377                     0.068456   \n",
              "9                          0.000000                     0.000000   \n",
              "10                         0.000000                     0.000000   \n",
              "12                         0.000000                     0.000000   \n",
              "...                             ...                          ...   \n",
              "1268254                    0.000000                     0.000000   \n",
              "1268256                    0.000000                     0.000000   \n",
              "1268257                    0.000000                     0.000000   \n",
              "1268258                    0.000000                     0.000000   \n",
              "1268259                    0.000000                     0.000000   \n",
              "\n",
              "         blocks_btwn_output_txs_median  num_addr_transacted_multiple  \\\n",
              "0                             0.000000                           0.0   \n",
              "1                             0.083293                           0.0   \n",
              "9                             0.000000                           0.0   \n",
              "10                            0.000000                           0.0   \n",
              "12                            0.000000                           0.0   \n",
              "...                                ...                           ...   \n",
              "1268254                       0.000000                           0.0   \n",
              "1268256                       0.000000                           0.0   \n",
              "1268257                       0.000000                           0.0   \n",
              "1268258                       0.000000                           0.0   \n",
              "1268259                       0.000000                           0.0   \n",
              "\n",
              "         transacted_w_address_total  transacted_w_address_min  \\\n",
              "0                          0.000608                       0.0   \n",
              "1                          0.000185                       0.0   \n",
              "9                          0.000000                       0.0   \n",
              "10                         0.000079                       0.0   \n",
              "12                         0.000106                       0.0   \n",
              "...                             ...                       ...   \n",
              "1268254                    0.000053                       0.0   \n",
              "1268256                    0.000000                       0.0   \n",
              "1268257                    0.000000                       0.0   \n",
              "1268258                    0.000000                       0.0   \n",
              "1268259                    0.000000                       0.0   \n",
              "\n",
              "         transacted_w_address_max  transacted_w_address_mean  \\\n",
              "0                             0.0                        0.0   \n",
              "1                             0.0                        0.0   \n",
              "9                             0.0                        0.0   \n",
              "10                            0.0                        0.0   \n",
              "12                            0.0                        0.0   \n",
              "...                           ...                        ...   \n",
              "1268254                       0.0                        0.0   \n",
              "1268256                       0.0                        0.0   \n",
              "1268257                       0.0                        0.0   \n",
              "1268258                       0.0                        0.0   \n",
              "1268259                       0.0                        0.0   \n",
              "\n",
              "         transacted_w_address_median  \n",
              "0                                0.0  \n",
              "1                                0.0  \n",
              "9                                0.0  \n",
              "10                               0.0  \n",
              "12                               0.0  \n",
              "...                              ...  \n",
              "1268254                          0.0  \n",
              "1268256                          0.0  \n",
              "1268257                          0.0  \n",
              "1268258                          0.0  \n",
              "1268259                          0.0  \n",
              "\n",
              "[822942 rows x 57 columns]"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-fcec902e-741f-44ad-ad21-5de544759fb8\">\n",
              "    <div class=\"colab-df-container\">\n",
              "      <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>address</th>\n",
              "      <th>class</th>\n",
              "      <th>num_txs_as_sender</th>\n",
              "      <th>num_txs_as receiver</th>\n",
              "      <th>first_block_appeared_in</th>\n",
              "      <th>last_block_appeared_in</th>\n",
              "      <th>lifetime_in_blocks</th>\n",
              "      <th>total_txs</th>\n",
              "      <th>first_sent_block</th>\n",
              "      <th>first_received_block</th>\n",
              "      <th>...</th>\n",
              "      <th>blocks_btwn_output_txs_min</th>\n",
              "      <th>blocks_btwn_output_txs_max</th>\n",
              "      <th>blocks_btwn_output_txs_mean</th>\n",
              "      <th>blocks_btwn_output_txs_median</th>\n",
              "      <th>num_addr_transacted_multiple</th>\n",
              "      <th>transacted_w_address_total</th>\n",
              "      <th>transacted_w_address_min</th>\n",
              "      <th>transacted_w_address_max</th>\n",
              "      <th>transacted_w_address_mean</th>\n",
              "      <th>transacted_w_address_median</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>111112TykSw72ztDN2WJger4cynzWYC5w</td>\n",
              "      <td>2</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.001825</td>\n",
              "      <td>0.499985</td>\n",
              "      <td>0.499985</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.900837</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000608</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>1111DAYXhoxZx2tsRnzimfozo783x1yC2</td>\n",
              "      <td>3</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.014599</td>\n",
              "      <td>0.500015</td>\n",
              "      <td>0.979168</td>\n",
              "      <td>0.479153</td>\n",
              "      <td>0.004762</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.900843</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.208377</td>\n",
              "      <td>0.068456</td>\n",
              "      <td>0.083293</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000185</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>9</th>\n",
              "      <td>1111VHuXEzHaRCgXbVwojtaP7Co3QABb</td>\n",
              "      <td>2</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.001825</td>\n",
              "      <td>0.416657</td>\n",
              "      <td>0.416657</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.884312</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>10</th>\n",
              "      <td>111218KKkh1JJFRHbwM16AwCiVCc4m7he1</td>\n",
              "      <td>3</td>\n",
              "      <td>0.000688</td>\n",
              "      <td>0.001825</td>\n",
              "      <td>0.333309</td>\n",
              "      <td>0.333309</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000680</td>\n",
              "      <td>0.867782</td>\n",
              "      <td>0.867782</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000079</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>12</th>\n",
              "      <td>1115LWW3xsD9jT9VRY7viCN9S34RVAAuA</td>\n",
              "      <td>2</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.001825</td>\n",
              "      <td>0.395898</td>\n",
              "      <td>0.395898</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.880195</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000106</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1268254</th>\n",
              "      <td>3R2Uw5MRdSSigp8AjfT7K5es6Hupm4qLSq</td>\n",
              "      <td>3</td>\n",
              "      <td>0.000688</td>\n",
              "      <td>0.001825</td>\n",
              "      <td>0.624996</td>\n",
              "      <td>0.625006</td>\n",
              "      <td>0.000010</td>\n",
              "      <td>0.000680</td>\n",
              "      <td>0.925631</td>\n",
              "      <td>0.925629</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000053</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1268256</th>\n",
              "      <td>3R2VBFbqHGC4bQ7b4ixN4jZTdv7RMbEYtf</td>\n",
              "      <td>3</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.001825</td>\n",
              "      <td>0.895841</td>\n",
              "      <td>0.895841</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.979343</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1268257</th>\n",
              "      <td>3R2WFmRwbDeo3rMVVu5J3jjMxAuQYYWAid</td>\n",
              "      <td>3</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.001825</td>\n",
              "      <td>0.166799</td>\n",
              "      <td>0.166799</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.834760</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1268258</th>\n",
              "      <td>3R2WTZGYLmbJQyoDSBftJsPRvF1mSEtkh6</td>\n",
              "      <td>3</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.001825</td>\n",
              "      <td>0.041695</td>\n",
              "      <td>0.041695</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.809949</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1268259</th>\n",
              "      <td>3R2bm6iqbzcVpEeFCSFarS56b56QfjyiSW</td>\n",
              "      <td>3</td>\n",
              "      <td>0.000688</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.166706</td>\n",
              "      <td>0.166706</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.834742</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>822942 rows × 57 columns</p>\n",
              "</div>\n",
              "      <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-fcec902e-741f-44ad-ad21-5de544759fb8')\"\n",
              "              title=\"Convert this dataframe to an interactive table.\"\n",
              "              style=\"display:none;\">\n",
              "        \n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
              "    <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
              "  </svg>\n",
              "      </button>\n",
              "      \n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      flex-wrap:wrap;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "      <script>\n",
              "        const buttonEl =\n",
              "          document.querySelector('#df-fcec902e-741f-44ad-ad21-5de544759fb8 button.colab-df-convert');\n",
              "        buttonEl.style.display =\n",
              "          google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "        async function convertToInteractive(key) {\n",
              "          const element = document.querySelector('#df-fcec902e-741f-44ad-ad21-5de544759fb8');\n",
              "          const dataTable =\n",
              "            await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                     [key], {});\n",
              "          if (!dataTable) return;\n",
              "\n",
              "          const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "            '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "            + ' to learn more about interactive tables.';\n",
              "          element.innerHTML = '';\n",
              "          dataTable['output_type'] = 'display_data';\n",
              "          await google.colab.output.renderOutput(dataTable, element);\n",
              "          const docLink = document.createElement('div');\n",
              "          docLink.innerHTML = docLinkHtml;\n",
              "          element.appendChild(docLink);\n",
              "        }\n",
              "      </script>\n",
              "    </div>\n",
              "  </div>\n",
              "  "
            ]
          },
          "metadata": {},
          "execution_count": 134
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "# remove 'unknown' actors\n",
        "data = df_wallets_classification.loc[(df_wallets_classification['class'] != 3), 'address']\n",
        "df_wallets_feature_selected = df_wallets_classification.loc[df_wallets_classification['address'].isin(data)]\n",
        "df_wallets_feature_selected"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 505
        },
        "id": "ogpHA22sI6eM",
        "outputId": "4f9b6f92-e4b1-451b-f107-a633fb25b6dd"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "                                    address  class  num_txs_as_sender  \\\n",
              "0         111112TykSw72ztDN2WJger4cynzWYC5w      2           0.000000   \n",
              "9          1111VHuXEzHaRCgXbVwojtaP7Co3QABb      2           0.000000   \n",
              "12        1115LWW3xsD9jT9VRY7viCN9S34RVAAuA      2           0.000000   \n",
              "13        1117wASFaYgJJP6MiY8cPD5DMdQda8gDZ      2           0.000688   \n",
              "15        111ECNFEjJsQJ6LkAsAESBGTHBvZE66oX      2           0.000000   \n",
              "...                                     ...    ...                ...   \n",
              "1268243  3R2KQxz2Uk7xF9bfDGffTn52NrfnBjdaLy      2           0.000000   \n",
              "1268244  3R2LAgPtnjeU2XdyR1GUXaTzKmh81VETYm      2           0.000000   \n",
              "1268251  3R2SZEK2UggNm1ntkXTe8eoea11sxg9vjw      2           0.000000   \n",
              "1268252  3R2TfX1PDN93SHbDXZqYPCn1cgmCeLMBra      2           0.000000   \n",
              "1268253  3R2URFhybtzYckKxbP17qMYN989fWC8quM      2           0.000000   \n",
              "\n",
              "         num_txs_as receiver  first_block_appeared_in  last_block_appeared_in  \\\n",
              "0                   0.001825                 0.499985                0.499985   \n",
              "9                   0.001825                 0.416657                0.416657   \n",
              "12                  0.001825                 0.395898                0.395898   \n",
              "13                  0.001825                 0.083379                0.083400   \n",
              "15                  0.001825                 0.333371                0.333371   \n",
              "...                      ...                      ...                     ...   \n",
              "1268243             0.001825                 0.208360                0.208360   \n",
              "1268244             0.001825                 0.458331                0.458331   \n",
              "1268251             0.001825                 0.312508                0.312508   \n",
              "1268252             0.001825                 0.479173                0.479173   \n",
              "1268253             0.001825                 0.645797                0.645797   \n",
              "\n",
              "         lifetime_in_blocks  total_txs  first_sent_block  \\\n",
              "0                  0.000000    0.00000           0.00000   \n",
              "9                  0.000000    0.00000           0.00000   \n",
              "12                 0.000000    0.00000           0.00000   \n",
              "13                 0.000021    0.00068           0.81822   \n",
              "15                 0.000000    0.00000           0.00000   \n",
              "...                     ...        ...               ...   \n",
              "1268243            0.000000    0.00000           0.00000   \n",
              "1268244            0.000000    0.00000           0.00000   \n",
              "1268251            0.000000    0.00000           0.00000   \n",
              "1268252            0.000000    0.00000           0.00000   \n",
              "1268253            0.000000    0.00000           0.00000   \n",
              "\n",
              "         first_received_block  ...  blocks_btwn_output_txs_min  \\\n",
              "0                    0.900837  ...                         0.0   \n",
              "9                    0.884312  ...                         0.0   \n",
              "12                   0.880195  ...                         0.0   \n",
              "13                   0.818216  ...                         0.0   \n",
              "15                   0.867794  ...                         0.0   \n",
              "...                       ...  ...                         ...   \n",
              "1268243              0.843002  ...                         0.0   \n",
              "1268244              0.892576  ...                         0.0   \n",
              "1268251              0.863657  ...                         0.0   \n",
              "1268252              0.896710  ...                         0.0   \n",
              "1268253              0.929755  ...                         0.0   \n",
              "\n",
              "         blocks_btwn_output_txs_max  blocks_btwn_output_txs_mean  \\\n",
              "0                               0.0                          0.0   \n",
              "9                               0.0                          0.0   \n",
              "12                              0.0                          0.0   \n",
              "13                              0.0                          0.0   \n",
              "15                              0.0                          0.0   \n",
              "...                             ...                          ...   \n",
              "1268243                         0.0                          0.0   \n",
              "1268244                         0.0                          0.0   \n",
              "1268251                         0.0                          0.0   \n",
              "1268252                         0.0                          0.0   \n",
              "1268253                         0.0                          0.0   \n",
              "\n",
              "         blocks_btwn_output_txs_median  num_addr_transacted_multiple  \\\n",
              "0                                  0.0                           0.0   \n",
              "9                                  0.0                           0.0   \n",
              "12                                 0.0                           0.0   \n",
              "13                                 0.0                           0.0   \n",
              "15                                 0.0                           0.0   \n",
              "...                                ...                           ...   \n",
              "1268243                            0.0                           0.0   \n",
              "1268244                            0.0                           0.0   \n",
              "1268251                            0.0                           0.0   \n",
              "1268252                            0.0                           0.0   \n",
              "1268253                            0.0                           0.0   \n",
              "\n",
              "         transacted_w_address_total  transacted_w_address_min  \\\n",
              "0                          0.000608                       0.0   \n",
              "9                          0.000000                       0.0   \n",
              "12                         0.000106                       0.0   \n",
              "13                         0.000053                       0.0   \n",
              "15                         0.000264                       0.0   \n",
              "...                             ...                       ...   \n",
              "1268243                    0.000079                       0.0   \n",
              "1268244                    0.000106                       0.0   \n",
              "1268251                    0.000211                       0.0   \n",
              "1268252                    0.000264                       0.0   \n",
              "1268253                    0.000079                       0.0   \n",
              "\n",
              "         transacted_w_address_max  transacted_w_address_mean  \\\n",
              "0                             0.0                        0.0   \n",
              "9                             0.0                        0.0   \n",
              "12                            0.0                        0.0   \n",
              "13                            0.0                        0.0   \n",
              "15                            0.0                        0.0   \n",
              "...                           ...                        ...   \n",
              "1268243                       0.0                        0.0   \n",
              "1268244                       0.0                        0.0   \n",
              "1268251                       0.0                        0.0   \n",
              "1268252                       0.0                        0.0   \n",
              "1268253                       0.0                        0.0   \n",
              "\n",
              "         transacted_w_address_median  \n",
              "0                                0.0  \n",
              "9                                0.0  \n",
              "12                               0.0  \n",
              "13                               0.0  \n",
              "15                               0.0  \n",
              "...                              ...  \n",
              "1268243                          0.0  \n",
              "1268244                          0.0  \n",
              "1268251                          0.0  \n",
              "1268252                          0.0  \n",
              "1268253                          0.0  \n",
              "\n",
              "[265354 rows x 57 columns]"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-5b280ab7-0090-499e-886e-dba1d6f3968a\">\n",
              "    <div class=\"colab-df-container\">\n",
              "      <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>address</th>\n",
              "      <th>class</th>\n",
              "      <th>num_txs_as_sender</th>\n",
              "      <th>num_txs_as receiver</th>\n",
              "      <th>first_block_appeared_in</th>\n",
              "      <th>last_block_appeared_in</th>\n",
              "      <th>lifetime_in_blocks</th>\n",
              "      <th>total_txs</th>\n",
              "      <th>first_sent_block</th>\n",
              "      <th>first_received_block</th>\n",
              "      <th>...</th>\n",
              "      <th>blocks_btwn_output_txs_min</th>\n",
              "      <th>blocks_btwn_output_txs_max</th>\n",
              "      <th>blocks_btwn_output_txs_mean</th>\n",
              "      <th>blocks_btwn_output_txs_median</th>\n",
              "      <th>num_addr_transacted_multiple</th>\n",
              "      <th>transacted_w_address_total</th>\n",
              "      <th>transacted_w_address_min</th>\n",
              "      <th>transacted_w_address_max</th>\n",
              "      <th>transacted_w_address_mean</th>\n",
              "      <th>transacted_w_address_median</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>111112TykSw72ztDN2WJger4cynzWYC5w</td>\n",
              "      <td>2</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.001825</td>\n",
              "      <td>0.499985</td>\n",
              "      <td>0.499985</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.00000</td>\n",
              "      <td>0.00000</td>\n",
              "      <td>0.900837</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000608</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>9</th>\n",
              "      <td>1111VHuXEzHaRCgXbVwojtaP7Co3QABb</td>\n",
              "      <td>2</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.001825</td>\n",
              "      <td>0.416657</td>\n",
              "      <td>0.416657</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.00000</td>\n",
              "      <td>0.00000</td>\n",
              "      <td>0.884312</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>12</th>\n",
              "      <td>1115LWW3xsD9jT9VRY7viCN9S34RVAAuA</td>\n",
              "      <td>2</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.001825</td>\n",
              "      <td>0.395898</td>\n",
              "      <td>0.395898</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.00000</td>\n",
              "      <td>0.00000</td>\n",
              "      <td>0.880195</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000106</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>13</th>\n",
              "      <td>1117wASFaYgJJP6MiY8cPD5DMdQda8gDZ</td>\n",
              "      <td>2</td>\n",
              "      <td>0.000688</td>\n",
              "      <td>0.001825</td>\n",
              "      <td>0.083379</td>\n",
              "      <td>0.083400</td>\n",
              "      <td>0.000021</td>\n",
              "      <td>0.00068</td>\n",
              "      <td>0.81822</td>\n",
              "      <td>0.818216</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000053</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>15</th>\n",
              "      <td>111ECNFEjJsQJ6LkAsAESBGTHBvZE66oX</td>\n",
              "      <td>2</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.001825</td>\n",
              "      <td>0.333371</td>\n",
              "      <td>0.333371</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.00000</td>\n",
              "      <td>0.00000</td>\n",
              "      <td>0.867794</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000264</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1268243</th>\n",
              "      <td>3R2KQxz2Uk7xF9bfDGffTn52NrfnBjdaLy</td>\n",
              "      <td>2</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.001825</td>\n",
              "      <td>0.208360</td>\n",
              "      <td>0.208360</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.00000</td>\n",
              "      <td>0.00000</td>\n",
              "      <td>0.843002</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000079</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1268244</th>\n",
              "      <td>3R2LAgPtnjeU2XdyR1GUXaTzKmh81VETYm</td>\n",
              "      <td>2</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.001825</td>\n",
              "      <td>0.458331</td>\n",
              "      <td>0.458331</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.00000</td>\n",
              "      <td>0.00000</td>\n",
              "      <td>0.892576</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000106</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1268251</th>\n",
              "      <td>3R2SZEK2UggNm1ntkXTe8eoea11sxg9vjw</td>\n",
              "      <td>2</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.001825</td>\n",
              "      <td>0.312508</td>\n",
              "      <td>0.312508</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.00000</td>\n",
              "      <td>0.00000</td>\n",
              "      <td>0.863657</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000211</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1268252</th>\n",
              "      <td>3R2TfX1PDN93SHbDXZqYPCn1cgmCeLMBra</td>\n",
              "      <td>2</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.001825</td>\n",
              "      <td>0.479173</td>\n",
              "      <td>0.479173</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.00000</td>\n",
              "      <td>0.00000</td>\n",
              "      <td>0.896710</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000264</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1268253</th>\n",
              "      <td>3R2URFhybtzYckKxbP17qMYN989fWC8quM</td>\n",
              "      <td>2</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.001825</td>\n",
              "      <td>0.645797</td>\n",
              "      <td>0.645797</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.00000</td>\n",
              "      <td>0.00000</td>\n",
              "      <td>0.929755</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000079</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>265354 rows × 57 columns</p>\n",
              "</div>\n",
              "      <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-5b280ab7-0090-499e-886e-dba1d6f3968a')\"\n",
              "              title=\"Convert this dataframe to an interactive table.\"\n",
              "              style=\"display:none;\">\n",
              "        \n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
              "    <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
              "  </svg>\n",
              "      </button>\n",
              "      \n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      flex-wrap:wrap;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "      <script>\n",
              "        const buttonEl =\n",
              "          document.querySelector('#df-5b280ab7-0090-499e-886e-dba1d6f3968a button.colab-df-convert');\n",
              "        buttonEl.style.display =\n",
              "          google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "        async function convertToInteractive(key) {\n",
              "          const element = document.querySelector('#df-5b280ab7-0090-499e-886e-dba1d6f3968a');\n",
              "          const dataTable =\n",
              "            await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                     [key], {});\n",
              "          if (!dataTable) return;\n",
              "\n",
              "          const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "            '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "            + ' to learn more about interactive tables.';\n",
              "          element.innerHTML = '';\n",
              "          dataTable['output_type'] = 'display_data';\n",
              "          await google.colab.output.renderOutput(dataTable, element);\n",
              "          const docLink = document.createElement('div');\n",
              "          docLink.innerHTML = docLinkHtml;\n",
              "          element.appendChild(docLink);\n",
              "        }\n",
              "      </script>\n",
              "    </div>\n",
              "  </div>\n",
              "  "
            ]
          },
          "metadata": {},
          "execution_count": 135
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [],
      "metadata": {
        "id": "hqoZEG47J-QD"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "Split the data into training and testing sets with 70/30 split:"
      ],
      "metadata": {
        "id": "1yHvfgghreFy"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# Goal: binary classification of 0,1\n",
        "# 0: licit, 1: illicit\n",
        "\n",
        "# change illicit (class-2) to '0' for classification\n",
        "y = df_wallets_feature_selected[['class']]\n",
        "y = y['class'].apply(lambda x: 0 if x == 2 else 1 )\n",
        "\n",
        "X_train, X_test, y_train, y_test = train_test_split(df_wallets_feature_selected,y,test_size=0.30,random_state=15, shuffle=False)\n",
        "X_train = X_train.drop(columns=['address', 'class'])\n",
        "X_test = X_test.drop(columns=['address', 'class'])"
      ],
      "metadata": {
        "id": "UQ8yTO0rI6XV"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "Run classifiers (LR, RF, MLP, XGB):"
      ],
      "metadata": {
        "id": "px1WEceJs0jm"
      }
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "e2c05db2-bba8-4eb2-d9b4-d58ac62cdd48",
        "id": "7PfhVySoKcu7"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Logistic Regression\n",
            "Precision: 0.477 \n",
            "Recall: 0.046 \n",
            "F1 Score: 0.083\n",
            "Micro-Average F1 Score: 0.964\n"
          ]
        }
      ],
      "source": [
        "# LOGISTIC REGRESSION (LR)\n",
        "cLR = LogisticRegression(max_iter=1000).fit(X_train.values,y_train.values)\n",
        "y_preds_LR = cLR.predict(X_test.values)\n",
        "prec,rec,f1,num = precision_recall_fscore_support(y_test.values, y_preds_LR)\n",
        "\n",
        "print(\"Logistic Regression\")\n",
        "print(\"Precision: %.3f \\nRecall: %.3f \\nF1 Score: %.3f\"%(prec[1],rec[1],f1[1]))\n",
        "micro_f1 = f1_score(y_test, y_preds_LR, average='micro')\n",
        "print(\"Micro-Average F1 Score: %.3f\"%(micro_f1))"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "VUNTtTvdHObf",
        "outputId": "3237362a-66d2-4756-b19b-6640500c2265"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Random Forest 50 trees\n",
            "Precision: 0.911 \n",
            "Recall: 0.789 \n",
            "F1 Score: 0.845\n",
            "Micro-Average F1 Score: 0.990\n"
          ]
        }
      ],
      "source": [
        "# RANDOM FOREST (RF)\n",
        "cRF = RandomForestClassifier(n_estimators=50).fit(X_train.values,y_train.values)\n",
        "y_preds_RF = cRF.predict(X_test.values)\n",
        "prec,rec,f1,num = precision_recall_fscore_support(y_test.values, y_preds_RF)\n",
        "\n",
        "print(\"Random Forest 50 trees\")\n",
        "print(\"Precision: %.3f \\nRecall: %.3f \\nF1 Score: %.3f\"%(prec[1],rec[1],f1[1]))\n",
        "micro_f1 = f1_score(y_test, y_preds_RF, average='micro')\n",
        "print(\"Micro-Average F1 Score: %.3f\"%(micro_f1))"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "71pdefvzH-pj",
        "outputId": "7a048c4c-a321-41bf-9691-8429aa84830f"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Multilayer Perceptron (MLP)\n",
            "Precision: 0.747 \n",
            "Recall: 0.413 \n",
            "F1 Score: 0.532\n",
            "Micro-Average F1 Score: 0.974\n"
          ]
        }
      ],
      "source": [
        "# MULTILAYER PERCEPTRON (MLP)\n",
        "cMLP = MLPClassifier(solver='adam', learning_rate_init=0.001, max_iter=500).fit(X_train.values,y_train.values)\n",
        "y_preds_MLP = cMLP.predict(X_test.values)\n",
        "prec,rec,f1,num = precision_recall_fscore_support(y_test.values, y_preds_MLP)\n",
        "\n",
        "print(\"Multilayer Perceptron (MLP)\")\n",
        "print(\"Precision: %.3f \\nRecall: %.3f \\nF1 Score: %.3f\"%(prec[1],rec[1],f1[1]))\n",
        "micro_f1 = f1_score(y_test, y_preds_MLP, average='micro')\n",
        "print(\"Micro-Average F1 Score: %.3f\"%(micro_f1))"
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "# XGBOOST (XGB)\n",
        "cXGB = xgb.XGBClassifier(objective=\"multi:softmax\", num_class=2, random_state=42)\n",
        "cXGB.fit(X_train.values, y_train.values)\n",
        "y_preds_XGB = cXGB.predict(X_test.values)\n",
        "prec,rec,f1,num = precision_recall_fscore_support(y_test.values, y_preds_XGB)\n",
        "\n",
        "print(\"XGBOOST\")\n",
        "print(\"Precision: %.3f \\nRecall: %.3f \\nF1 Score: %.3f\"%(prec[1],rec[1],f1[1]))\n",
        "micro_f1 = f1_score(y_test, y_preds_XGB, average='micro')\n",
        "print(\"Micro-Average F1 Score: %.3f\"%(micro_f1))"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "q-TF75xyHVMm",
        "outputId": "a55aac54-2837-48d9-8abe-06660796959a"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "XGBOOST\n",
            "Precision: 0.869 \n",
            "Recall: 0.534 \n",
            "F1 Score: 0.662\n",
            "Micro-Average F1 Score: 0.980\n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "Run ensemble classifiers (RF+MLP, RF+XGB, MLP+XGB, RF+MLP+XGB):"
      ],
      "metadata": {
        "id": "tHTu-iSgyf-u"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "#create a dictionary of our models\n",
        "estimatorsRFMLP=[('MLP', cMLP), ('RF', cRF)]\n",
        "#create our voting classifier, inputting our models\n",
        "ensembleRFMLP = VotingClassifier(estimatorsRFMLP, voting='hard')\n",
        "ensembleRFMLP.fit(X_train.values, y_train.values)\n",
        "y_preds_RFMLP = ensembleRFMLP.predict(X_test.values)\n",
        "prec,rec,f1,num = precision_recall_fscore_support(y_test.values, y_preds_RFMLP)\n",
        "\n",
        "print(\"Ensemble: Random Forest (RF) + Multilayer Perceptron (MLP)\")\n",
        "print(\"Precision: %.3f \\nRecall: %.3f \\nF1 Score: %.3f\"%(prec[1],rec[1],f1[1]))\n",
        "micro_f1 = f1_score(y_test, y_preds_RFMLP, average='micro')\n",
        "print(\"Micro-Average F1 Score: %.3f\"%(micro_f1))"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "t8u6s6vOmZLn",
        "outputId": "779e3ae6-9276-4650-ec69-27f5f52f8cd4"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Ensemble: Random Forest (RF) + Multilayer Perceptron (MLP)\n",
            "Precision: 0.967 \n",
            "Recall: 0.403 \n",
            "F1 Score: 0.568\n",
            "Micro-Average F1 Score: 0.978\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "#create a dictionary of our models\n",
        "estimatorsXGBRF=[('RF', cRF), ('XGB', cXGB)]\n",
        "#create our voting classifier, inputting our models\n",
        "ensembleXGBRF = VotingClassifier(estimatorsXGBRF, voting='hard')\n",
        "ensembleXGBRF.fit(X_train.values, y_train.values)\n",
        "y_preds_XGBRF = ensembleXGBRF.predict(X_test.values)\n",
        "prec,rec,f1,num = precision_recall_fscore_support(y_test.values, y_preds_XGBRF)\n",
        "\n",
        "print(\"Ensemble: XGBoost (XGB) + Random Forest (RF)\")\n",
        "print(\"Precision: %.3f \\nRecall: %.3f \\nF1 Score: %.3f\"%(prec[1],rec[1],f1[1]))\n",
        "micro_f1 = f1_score(y_test, y_preds_XGBRF, average='micro')\n",
        "print(\"Micro-Average F1 Score: %.3f\"%(micro_f1))"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "rE-LCNAUv2bG",
        "outputId": "1706e369-19be-4690-b150-138976a478e6"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Ensemble: XGBoost (XGB) + Random Forest (RF)\n",
            "Precision: 0.959 \n",
            "Recall: 0.530 \n",
            "F1 Score: 0.682\n",
            "Micro-Average F1 Score: 0.982\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "#create a dictionary of our models\n",
        "estimatorsMLPXGB=[('MLP', cMLP), ('XGB', cXGB)]\n",
        "#create our voting classifier, inputting our models\n",
        "ensembleMLPXGB = VotingClassifier(estimatorsMLPXGB, voting='hard')\n",
        "ensembleMLPXGB.fit(X_train.values, y_train.values)\n",
        "y_preds_MLPXGB = ensembleMLPXGB.predict(X_test.values)\n",
        "prec,rec,f1,num = precision_recall_fscore_support(y_test.values, y_preds_MLPXGB)\n",
        "\n",
        "print(\"Ensemble: Multilayer Perceptron (MLP) + XGBoost\")\n",
        "print(\"Precision: %.3f \\nRecall: %.3f \\nF1 Score: %.3f\"%(prec[1],rec[1],f1[1]))\n",
        "micro_f1 = f1_score(y_test, y_preds_MLPXGB, average='micro')\n",
        "print(\"Micro-Average F1 Score: %.3f\"%(micro_f1))"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "8DNeYG7kG4qS",
        "outputId": "6746eb98-8867-487b-b052-1aa904299c16"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Ensemble: Multilayer Perceptron (MLP) + XGBoost\n",
            "Precision: 0.929 \n",
            "Recall: 0.324 \n",
            "F1 Score: 0.481\n",
            "Micro-Average F1 Score: 0.975\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "#create a dictionary of our models\n",
        "estimatorsXGBRFMLP=[('XGB', cXGB_selected), ('MLP', cMLP), ('RF', cRF)]\n",
        "#create our voting classifier, inputting our models\n",
        "ensembleXGBRFMLP = VotingClassifier(estimatorsXGBRFMLP, voting='hard')\n",
        "ensembleXGBRFMLP.fit(X_train.values, y_train.values)\n",
        "y_preds_XGBRFMLP = ensembleXGBRFMLP.predict(X_test.values)\n",
        "prec,rec,f1,num = precision_recall_fscore_support(y_test.values, y_preds_XGBRFMLP)\n",
        "\n",
        "print(\"Ensemble (all): XGBoost + Random Forest (RF) + Multilayer Perceptron (MLP)\")\n",
        "print(\"Precision: %.3f \\nRecall: %.3f \\nF1 Score: %.3f\"%(prec[1],rec[1],f1[1]))\n",
        "micro_f1 = f1_score(y_test, y_preds_XGBRFMLP, average='micro')\n",
        "print(\"Micro-Average F1 Score: %.3f\"%(micro_f1))"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "t3XzOoWcm1jZ",
        "outputId": "127568ba-84ab-40b9-8e72-61a3126e9986"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Ensemble (all): XGBoost + Random Forest (RF) + Multilayer Perceptron (MLP)\n",
            "Precision: 0.932 \n",
            "Recall: 0.571 \n",
            "F1 Score: 0.709\n",
            "Micro-Average F1 Score: 0.983\n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "(LSTM not included)"
      ],
      "metadata": {
        "id": "dNR2aTas1Ej3"
      }
    },
    {
      "cell_type": "code",
      "source": [],
      "metadata": {
        "id": "LRcjdSBwqaZ1"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "# **Acknowledgements**\n",
        "\n",
        "\n",
        "---\n",
        "---\n",
        "\n",
        "\n",
        "Released by: Youssef Elmougy, Ling Liu\n",
        "\n",
        "\n",
        "\n",
        "School of Computer Science, Georgia Institute of Technology\n",
        "\n",
        "Contact: yelmougy3@gatech.edu\n",
        "\n",
        "\n",
        "---\n",
        "\n",
        "Github Repository: [https://www.github.com/git-disl/EllipticPlusPlus](https://www.github.com/git-disl/EllipticPlusPlus)\n",
        "\n",
        "\n",
        "If you use our dataset in your work, please cite our paper:\n",
        "\n",
        "\n",
        "\n",
        "\n",
        "\n",
        ">> Youssef Elmougy and Ling Liu. 2023. Demystifying Fraudulent Transactions and Illicit Nodes in the Bitcoin Network for Financial Forensics.\n",
        "\n",
        "---\n",
        "\n"
      ],
      "metadata": {
        "id": "BwrFHYfy5hrz"
      }
    }
  ]
}